https://github.com/klus3kk/microsociety
An object-oriented project, that represents the simulator of the society, with dynamically changing events and AI implemented methods for more lively environments.
https://github.com/klus3kk/microsociety
2d ai cpp deep-q-learning machine-learning oop python reinforcement-learning sfml simulation tensorflow
Last synced: 9 months ago
JSON representation
An object-oriented project, that represents the simulator of the society, with dynamically changing events and AI implemented methods for more lively environments.
- Host: GitHub
- URL: https://github.com/klus3kk/microsociety
- Owner: Klus3kk
- License: mit
- Created: 2024-10-04T08:21:26.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-24T22:25:34.000Z (9 months ago)
- Last Synced: 2025-02-24T23:27:12.094Z (9 months ago)
- Topics: 2d, ai, cpp, deep-q-learning, machine-learning, oop, python, reinforcement-learning, sfml, simulation, tensorflow
- Language: C++
- Homepage:
- Size: 1.03 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MicroSociety



## Description
MicroSociety is an object-oriented simulation project that models a dynamic society with AI-driven behaviors, events, and interactions. The project uses AI to create a lively, ever-changing environment.
## Setup Options
MicroSociety offers two setup options:
- **With TensorFlow (Docker-based)**: Enables advanced AI capabilities using TensorFlow.
- **Without TensorFlow (Local build)**: Provides a simpler setup without TensorFlow dependencies.
### Docker Setup with TensorFlow
1. Build the Docker image (TensorFlow-enabled):
```bash
docker build -t micro-society .
```
2. Run the Docker container:
```bash
docker run -it micro-society
```
### Local Setup without TensorFlow (Linux)
1. Rename `CMakeLists_without_tf.txt` to `CMakeLists.txt` in your local folder.
2. Create a build directory and compile:
```bash
mkdir build && cd build
cmake ..
make clean && make -j$(nproc)
```
3. Run the executable:
```bash
./MicroSociety
```
### Local Setup without TensorFlow (Windows)
1. Rename `CMakeLists_without_tf.txt` to `CMakeLists.txt` in your local folder.
2. Open the **Developer Command Prompt** for your compiler (e.g., MSVC).
3. Create a build directory:
```bash
mkdir build && cd build
```
4. Generate the project:
```bash
cmake -G "NMake Makefiles" ..
```
5. Build the project:
```bash
nmake
```
6. Run the executable:
```bash
MicroSociety.exe
```
### Memory Leak/Performance Profiling
If you want to check memory leaks or performance profiling, use Valgrind:
```bash
valgrind --leak-check=full --track-origins=yes ./MicroSociety
```
```bash
valgrind --tool=callgrind ./MicroSociety
kcachegrind callgrind.out.
```
Or gdb:
```bash
gdb ./MicroSociety
run
```
If the simulation crashes, write:
```bash
bt full
```