56
56
ask turtles [
57
57
pull
58
58
integrate-own-pull-info
59
- if critical-interaction [
60
- calc-posterior
61
- ]
62
59
]
63
60
ask turtles [
64
61
share
@@ -229,30 +226,35 @@ end
229
226
; the sharing of information between researchers optionally including
230
227
; critical-interaction
231
228
to share
232
- let cur-turtle self
233
- let successvec 0
234
- let pullcounter 0
229
+ let cur-turtle self
230
+ let cur-turtle-th mytheory
235
231
; first list entry is th1 2nd is th2
236
- let pulls-th1 list pulls 0
237
- let pulls-th2 list 0 pulls
238
- let neighbor-theory 0
232
+ let successvec [0 0 ]
233
+ let pullcounter [0 0 ]
239
234
ask link-neighbors [
240
- set successvec successes
241
- ifelse mytheory = 0 [
242
- set neighbor-theory 0
243
- set pullcounter pulls-th1
235
+ ifelse mytheory = cur-turtle-th or not critical-interaction [
236
+ set successvec (map + successvec successes)
237
+ set pullcounter replace-item mytheory pullcounter
238
+ (item mytheory pullcounter + pulls)
244
239
][
245
- set neighbor-theory 1
246
- set pullcounter pulls-th2
247
- ]
248
- ask cur-turtle [
249
- set a (map + a successvec)
250
- set b (map + b pullcounter)
251
- if critical-interaction and mytheory != neighbor-theory [
252
- evaluate-critically
240
+ let other-successes successes
241
+ let other-theory mytheory
242
+ let other-success-ratio ((item mytheory successes) / pulls)
243
+ if other-success-ratio > item mytheory [current-theory-info] of
244
+ cur-turtle [
245
+ ask cur-turtle [
246
+ evaluate-critically
247
+ ]
248
+ ]
249
+ ask cur-turtle [
250
+ set a (map + a other-successes)
251
+ set b replace-item other-theory b (item other-theory b + pulls)
252
+ calc-posterior
253
253
]
254
254
]
255
255
]
256
+ set a (map + a successvec)
257
+ set b (map + b pullcounter)
256
258
end
257
259
258
260
@@ -262,30 +264,19 @@ end
262
264
; If researchers communicate with researchers from another theory they might
263
265
; interact critically
264
266
to evaluate-critically
265
- let old-theory-info current-theory-info
266
- calc-posterior
267
- let diff-theory-info (map - current-theory-info old-theory-info)
267
+ let actual-prob-suc 0
268
268
ifelse mytheory = 0 [
269
- if item 0 diff-theory-info < 0 or item 1 diff-theory-info > 0 [
270
- set crit-interactions-th1 crit-interactions-th1 + 1
271
- if crit-interact-lock = 0 [
272
- set crit-interact-lock crit-jump-threshold
273
- ]
274
- let old-th-1 -signal item 0 subj-th-i-signal
275
- set subj-th-i-signal replace-item 0 subj-th-i-signal (old-th-1 -signal
276
- + (1 - old-th-1 -signal) * crit-strength)
277
- ]
269
+ set crit-interactions-th1 crit-interactions-th1 + 1
270
+ set actual-prob-suc 1
278
271
][
279
- if item 0 diff-theory-info > 0 or item 1 diff-theory-info < 0 [
280
- if crit-interact-lock = 0 [
281
- set crit-interact-lock crit-jump-threshold
282
- ]
283
- set crit-interactions-th2 crit-interactions-th2 + 1
284
- let old-th-2 -signal item 1 subj-th-i-signal
285
- set subj-th-i-signal replace-item 1 subj-th-i-signal (old-th-2 -signal
286
- + (0 - old-th-2 -signal) * crit-strength)
287
- ]
272
+ set crit-interactions-th2 crit-interactions-th2 + 1
273
+ ]
274
+ if crit-interact-lock = 0 [
275
+ set crit-interact-lock crit-jump-threshold
288
276
]
277
+ let old-th-i-signal item mytheory subj-th-i-signal
278
+ set subj-th-i-signal replace-item mytheory subj-th-i-signal (old-th-i-signal
279
+ + (actual-prob-suc - old-th-i-signal) * crit-strength)
289
280
end
290
281
291
282
0 commit comments