Skip to content

Amin-Mashayekhan/RSD-Algorithm-in-Python-and-PHP

Repository files navigation

Hi, This project executes the RSD (Random Serial Dictatorship) algorithm (mechanism).
The project is coded in two versions, including the PHP version and the Python version.
At the top of the code page, you can specify the agents variable (which includes the agent index as the array's key and the preferences of this agent as the value of this key. at the top of the code, for example, some of these variables created as a comment).
notice: the number of agents must be more than 1 and the number of agent's preferences (as non-duplicate goods in each agent's preferences) must be equal to the number of agents.
The interpretation of the algorithm output is as follows:
A dicrionary in Python version (or array for PHP version) : agents index(key) => agent goods(services) allocation possibility(value).
As a suggestion, use Visual Studio Code IDE to view and define agents variables easier and use one of Visual Studio Code IDE extensions called "Code Runner" to view algorithm output.
This project was created and developed by Mohammad Amin Mashayekhan. The coding of the project was done with the help of assistant professor Mehdi Feizi, stackoverflow.com, php2python.com and etc.
The following images are a sample of an input (variable agents contains 4 agents) and its output in this algorithm code.
In Python:
accessibility text
In PHP:

My Email: amin.mashayekhan@gmail.com
Thank you for visiting.