MicroSociety is an object-oriented simulation project that models a society with AI-driven behaviors, events and interactions.
The project uses AI to create a lively environment with support for both traditional Q-learning and TensorFlow-based deep learning.
Build with TensorFlow:
mkdir build && cd build
cmake ..
make -j$(nproc)
./bin/MicroSocietyBuild without TensorFlow:
mkdir build && cd build
cmake .. -DUSE_TENSORFLOW=OFF
make -j$(nproc)
./bin/MicroSocietyNote: Windows automatically disables TensorFlow due to incomplete C API headers. The simulation can use Q-learning instead.
-
Open Developer Command Prompt for Visual Studio
-
Build the project:
mkdir build && cd build cmake -G "NMake Makefiles" .. nmake bin\MicroSociety.exe
For Windows users
docker build -t microsociety .
docker run -it microsocietyWith X11 forwarding (Linux/macOS):
xhost +local:docker
docker run -it --rm \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
microsocietyThe simulation offers two AI modes selectable at startup:
- Reinforcement learning C++: NPCs use Q-learning algorithms
- Deep Q-learning TensorFlow: NPCs use neural networks