Skip to content

Commit 205e995

Browse files
committed
Update calc-confidence
* `calc-confidence` now always runs in case of convergence in the round where the updates from nature arrived.
1 parent 917ea18 commit 205e995

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

SocNetABM.nlogo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,11 @@ to go
6666
]
6767
]
6868
if nature-evidence-frequency > 0 and ticks != 0
69-
and ticks mod (1 / nature-evidence-frequency) = 0 [
69+
and ticks mod (1 / nature-evidence-frequency) = 0 [
7070
ask turtles [
7171
update-from-nature
7272
]
73+
set g-depressed-confidence false
7374
]
7475
ask turtles with [crit-interact-lock = 0
7576
and not member? mytheory cur-best-th] [

protocol.nls

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ to calc-confidence
8181
; for cautionarly reasons
8282
set belief-to-beat max (list 0 belief-to-beat)
8383
let cur-theory mytheory
84-
if converged-ticks = 0 [
84+
; the -1 correction in ticks compensates for the fact that this procedure
85+
; will be called after the go procedure and therefore the tick-counter has
86+
; already advanced one step further
87+
if converged-ticks = 0 or (nature-evidence-frequency > 0
88+
and (ticks - 1) != 0
89+
and (ticks - 1) mod (1 / nature-evidence-frequency) = 0) [
8590
set avg-neighbor-signal mean [item cur-theory subj-th-i-signal] of
8691
(turtle-set link-neighbors self)
8792
]

0 commit comments

Comments
 (0)