Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 15 days 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.

Awesome Lists containing this project

README

        

![CI](https://github.com/Klus3kk/microsociety/actions/workflows/ci.yml/badge.svg)
![License](https://img.shields.io/badge/License-MIT-blue)
![Language](https://img.shields.io/badge/C++-blue)
# 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
```

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.
```