Skip to content

Conversation

@Francescacaretti
Copy link

Modello implementato e, teoricamente, pronto.

mariopaolucci and others added 30 commits March 19, 2025 13:25
Co-authored-by: Benedetto Pitò - benedetto.pito@studio.unibo.it <benedetto.pito@studio.unibo.it>
Co-authored-by: simonecocca <simonecocca@users.noreply.github.com>
Co-authored-by: Nikocioni <Nikocioni@users.noreply.github.com>
Co-authored-by: Sonia Compri - sonia.compri@studio.unibo.it <sonia.compri@studio.unibo.it>
This model written in Python using Mesa3 aims to reproduce the model xnx_imitate_if_better.nlogo. The model should work quite well; you can modify the payoff matrix, the revision probability, and the number of agents and steps to obtain different results. In the end, the model should produce a stacked histogram where the model's evolution is visualized.
This model is a slightly more complex version of the previous one. The main difference is that the payoff matrix is a 5x5, meaning we now have five elements: rock, paper, scissors, lizard, and Spock. The idea is that each element can defeat two of the others and lose to the remaining two, keeping the game interesting and balanced.

Scissors cut paper

Paper covers rock

Rock crushes lizard

Lizard poisons Spock

Spock smashes scissors

Scissors decapitate lizard

Lizard eats paper

Paper disproves Spock

Spock vaporizes rock

And as always:

Rock crushes scissors
5x5 imitate if better

This model is a slightly more complex version of the previous one. The main difference is that the payoff matrix is a 5x5, meaning we now have five elements: rock, paper, scissors, lizard, and Spock. The idea is that each element can defeat two of the others and lose to the remaining two, keeping the game interesting and balanced.

Scissors cut paper

Paper covers rock

Rock crushes lizard

Lizard poisons Spock

Spock smashes scissors

Scissors decapitate lizard

Lizard eats paper

Paper disproves Spock

Spock vaporizes rock

And as always:

Rock crushes scissors

cretits to the CBS show "The big bang theory" - https://www.youtube.com/watch?v=Z2Dwxv-EMTM
Not perfect. It gives me some warnings related to agent placement, but the model still works. The code only shows the final state of the forest (trees that are still alive in green, or burned in red) and the graph showing the percentage of burned trees over time.
Set density at 60%
…s, on line 51). Thus, there's no need to call the `place_agent` method again.

Also, there is no need to remove the agents from the cells - we run the model only once.
Removed unused code (the grid knows its boundaries)
Fatte alcune modifiche estetiche nella presentazione del grafico e aggiustato le labels
…s an internal variable. Positioning is still done at the level of constructor, especially for this kind of agents who don't moce.
Ok, now it works - the trick was just not to ever touch self.pos, it'…
Modifiche al modello 2x2:
- agenti accoppiati casualmente a due a due 
- entrambi i membri di ciascuna coppia ottiene payoff
-aggiunta variabile played per garantire che ogni agente giochi una volta sola per tick
Non ottengo i risultati presentati dal capitolo del libro e dopo diverse revisioni non sono riuscito a capire il perchè
aggiunta shuffle_do ma non solaraViz
mariopaolucci and others added 30 commits May 6, 2025 14:33
Prima versione del modello nxn-imitate-if-better-noise-payoff-to-use in python. Da implementare nella parte grafica.
Ho aggiornato il modello in mesa 3. Rimane ancora da implementare la parte grafica. Sono a disposizione per suggerimenti.
Versione finale del codice per eventuali modifiche
…-IV-4-Caretti

nxn-games-on-networks.nlogo IV Caretti
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.