DangerBlack / marriage-problem-simulation

An algorithm to simulate the marriage problem in a real world scenario where agent act not in an ottimal way

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

marriage-problem-simulation

An algorithm to simulate the marriage problem in a real world scenario where agent act not in an optimal way

#Introduction

After the reading of this italian article "Il problema del matrimonio stabile" i decide to write my own social implementation of this problem in a real world scenario. Here the wikipedia article about the problem wikipedia.org I started setting up the problem as an agents based simulation, each agent is charaterised by two attribute:

  • ego: the self confidence of a person, if you had a strong ego you do not accept a low quality marriage
  • init: as initiative if you have a strong initiative you try to engage more partner and the stability of your marriage is weak

the simulation try to recreate a natural process of pairing and selection, where people has embedded preference list of each partner.

#Usage

Edit the main.py

//simulationCore(number of people, year of simulation)
sm = SimulationCore(100,60)

run the simulation

python main.py

About

An algorithm to simulate the marriage problem in a real world scenario where agent act not in an ottimal way

License:GNU General Public License v3.0


Languages

Language:Python 100.0%