Skip to content

TomerKigel/AgentTown

Repository files navigation

Agent town

The project

The project is an attempt to create a modular network supporting distributed constraint optimization problems research and development.

The Idea

The world of computer science has gone through many iterations in the past. First Computers were big and expensive thus computing was centralized, and it was done mainly in universities and large corporations. After that, a new era of personal computers has begun as computers became cheaper and more viable. Then the birth of the Internet gave rise to centralized servers. Finally, we arrive at today to the age of microservices and distributed computing. The fluctuation between centralized and distributed computing never stops. Each new iteration brings new challenges and advantages.

In this project, the focus is to create an infrastructure for solving distributed constraint optimization problems(DCOPs). Both for research and for the development of a real-world application for that type of computation. More on the subject of DCOPs can be found on this wikipedia page

DSA

To demonstrate the problems this project aims to solve and one approach to solving them I've decided to record the following introduction that focuses on an algorithm called: 'Distributed stochastic algorithm' or DSA.

In the video below I am explaining DSA and concepts in distributed calculation.

Youtube:

DSA

github:

Distributed.Stochastic.Algorithm.DSA.and.DCOP.s.explained.mp4

The goal

The goal is to create a central server that can be set up to monitor traffic within the network, collect data, display progress, and simulate an environment that is as close to a real-life environment as possible.

Simultaneously, clients simulating a single or a collection of agents operating independently must be implemented to allow them to run algorithms that can solve DCOPs.

Ideally in the future, virtual and simulated should become physical and real.

How to

To compile and run the project few things are required:

Download and install Boost library. An explanation can be found here: tutorial (build with --toolset=msvc14.2 --with-log link=shared, an example can be found in the GitHub workflows yml for Windows)

(mandatory for CAI project) Download SFML 64x(not 32bits!) version 2.5.1 or newer. link: download

On Windows

all settings are already set up properly in the .vcxproj files accordingly. After cloning You only need to add the path to the sfml and boost directories you have installed.

The project was developed in Visual Studio 2019 and uses toolset v142. If you are trying to build on a newer version of Visual Studio (2022 or higher) you might not have toolset v142 installed so you will need to install it.

In the

Project settings -> C/C++ -> General -> Additional Include Directories

you should add the include paths that look like:

C:\Program Files\boost\boost_1_81_0\;
I:\SFML-2.5.1\Include

In the

Project settings -> Linker -> General -> Additional Library Directories

you should add the lib paths that look like:

C:\Program Files\boost\boost_1_81_0\stage\lib;
I:\SFML-2.5.1\lib

For more information about the installation and setup, you can check SFML and BOOST official websites.

On Linux(Ubuntu)

all settings are already set up properly in the CMakeLists.txt files in each project. After cloning You only need to change the paths to boost and sfml in CMakelists.txt files that are in each project as you can see below:
set(BOOST_ROOT "/home/runner/work/AgentTown/boost")
set(SFML_DIR "$ENV{GITHUB_WORKSPACE}/sfml_install/usr/local/lib/cmake/SFML")

You can then open the terminal and make a build directory inside the AgentTown directory, build, and run from it:

mkdir build
cd build
cmake ..
make
./Framework_exe

building with cmake requires building with g++11 as this project uses the c++20 standard. verify your system is up to date.

here is a tutorial as to how to update gcc to allow use of cpp20 if it isn't g++11 or higher: g++11

Demo

video8971377139.mp4

Stay in touch

Tomer Kigel on Linkedin.

Tomer Kigel on Facebook.

Releases

No releases published

Packages

No packages published