Skip to content

Commit

Permalink
Fixed conditional statement for policy selection
Browse files Browse the repository at this point in the history
  • Loading branch information
jmiszczak committed Oct 27, 2023
1 parent c229458 commit 4152f96
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions cooperation_spatial_diversity.nlogo
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,14 @@ to go
play-pgg
]

;; imitate the strategy using the seleced policy
(ifelse imitation-policy = "linear" [
ask patches [
imitate-strategy-linear
]
] imitation-policy = "fermi-dirac" [
ask patches [
imitate-strategy-fermi-dirac
]
]
)

;; udate the strategy using the cumulative income from the round
;; imitate the strategy using the seleced policy, using the cumulative income from the round
ask patches [

;; strategy imitation method
(ifelse imitation-policy = "linear" [
imitate-strategy-linear
] imitation-policy = "linear" [
(ifelse imitation-policy = "fermi-dirac" [
imitate-strategy-fermi-dirac
] imitation-policy = "linear" [
imitate-strategy-linear
] imitation-policy = "differences" [
imitate-strategy-differences
])
Expand Down

0 comments on commit 4152f96

Please sign in to comment.