From e29f32fc215399009c4bfe8449cef13b5d86da21 Mon Sep 17 00:00:00 2001 From: Jarek Miszczak Date: Wed, 1 Mar 2023 13:14:51 +0100 Subject: [PATCH] Probabbilistic reevaluation --- cooperation_diversity_reputation.nlogo | 30 +++++++++++++++++++------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/cooperation_diversity_reputation.nlogo b/cooperation_diversity_reputation.nlogo index a3c7f41..f69715b 100644 --- a/cooperation_diversity_reputation.nlogo +++ b/cooperation_diversity_reputation.nlogo @@ -57,8 +57,7 @@ end ;;------------------------------------------------------------------------------------ to go ;; check if the neighborhoods should be chooes each round - ;; TODO: implement random selection of patches - if reevaluate-neighborhood [ + if random-float 1.0 < p-rev [ ask patches [ choose-random-neighborhood ] @@ -157,7 +156,7 @@ end to setup-patches ask patches [ ;; initail assignement of the neighborhood - choose-neighborhood + choose-random-neighborhood ;; initialize the income set income 0 @@ -491,7 +490,7 @@ synergy-factor synergy-factor 0 10 -5.9 +4.6 0.1 1 NIL @@ -598,19 +597,34 @@ CHOOSER imitation-policy imitation-policy "fermi-dirac" "linear" -1 +0 SWITCH 13 331 -253 +209 364 -reevaluate-neighborhood -reevaluate-neighborhood +reevaluate-neighborhs +reevaluate-neighborhs 0 1 -1000 +SLIDER +233 +390 +405 +423 +p-rev +p-rev +0 +0.01 +0.001 +0.001 +1 +NIL +HORIZONTAL + @#$#@#$#@ ## WHAT IS IT?