Configurable Prisoner's Dilemma simulation model #899
zeyus
started this conversation in
Show and tell
Replies: 3 comments 4 replies
-
It's great to see that you've achieved what you set out to do, and I hope you get a good mark for your work. I may look further into this when I have more time (I haven't had a change to look at the paper you've referenced). Thanks for sharing this. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Looks like really nice work, thanks for staying so communicative about your project! |
Beta Was this translation helpful? Give feedback.
1 reply
-
Just to add. Really nice work! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We've been working on this for a couple of weeks for an exam project.
What is it?
A 2D ABM simulating interactions of "games" between agents, specifically the prisoner's dilemma game, in which participants can either cooperate or defect, which has a payoff matrix.
![image](https://user-images.githubusercontent.com/75656/184105191-1f7af765-add8-4161-9998-062c39f65c18.png)
Axelrod, R., & Hamilton, W. D. (1981). The Evolution of Cooperation. Science, 211(4489), 1390–1396. https://doi.org/10.1126/science.7466396In this setup the default payoff matrix for interactions is
Agents play all of their neighbours and if they cannot, they move, and pay a cost of travel.
After play or movement each agent has the opportunity to reproduce if they have sufficient energy and an available space around them, if they reproduce, they pay the energy cost of reproduction.
Each round there is a cost of living imposed on all agents except agents that were just born in the reproduction phase.
Any agents that drop below zero energy die.
Other features
It was fun, I learned a lot, and the code is part spaghetti, part anti-pattern, part polypattern.
I'm fully aware that some things could be way more optimized, compartmentalized and cleaner, there are a bunch of TODOs and I'll slowly get around to adding them to the github issues and chip away at them but any suggestions welcome.
Repo here: https://github.com/zeyus/FLAMEGPU2-Prisoners-Dilemma-ABM
Beta Was this translation helpful? Give feedback.
All reactions