@@ -41,6 +41,18 @@ to setup
4141 seed-beliefs
4242 initialize-agents
4343
44+ print ""
45+ print "=== TOPOLOGY TOURNAMENT ==="
46+ print (word "Agents per topology: " agents-per-topology)
47+ print (word "Mode: " llm-status)
48+ print (word "Belief options: " belief-options)
49+ print ""
50+ print (word "Mesh initial: " belief-summary mesh-agents)
51+ print (word "Hierarchy initial: " belief-summary hierarchy-agents)
52+ print (word "Chain initial: " belief-summary chain-agents)
53+ print "==========================="
54+ print ""
55+
4456 reset-ticks
4557end
4658
@@ -189,6 +201,13 @@ to go
189201 ]
190202
191203 check-all-convergence
204+
205+ ;; Per-tick summary
206+ print (word "Tick " ticks
207+ " | mesh: " belief-summary mesh-agents " (" precision agreement-pct mesh-agents 0 "%)"
208+ " | hierarchy: " belief-summary hierarchy-agents " (" precision agreement-pct hierarchy-agents 0 "%)"
209+ " | chain: " belief-summary chain-agents " (" precision agreement-pct chain-agents 0 "%)")
210+
192211 update-tournament-state
193212 tick
194213end
210229
211230to decide-belief-llm [neighbor-beliefs]
212231 carefully [
213- ;; Every agent calls the LLM every tick — topology constrains what it sees
214232 llm:set-history (list
215233 (list "system" (word
216234 "You are agent " who " in a " topology-name " network with " length neighbor-beliefs " neighbors. "
@@ -227,11 +245,11 @@ to decide-belief-llm [neighbor-beliefs]
227245 "What belief do you choose?"
228246 )
229247 let chosen llm:choose prompt belief-options
230- print (word "Agent " who " (" topology-name ", " length neighbor-beliefs " nbrs): "
248+ print (word " Agent " who " (" topology-name ", " length neighbor-beliefs " nbrs): "
231249 belief " -> " chosen " [neighbors: " belief-count-summary neighbor-beliefs "]")
232250 set belief chosen
233251 ] [
234- print (word "Agent " who " LLM failed : " error-message ". Using deterministic. ")
252+ print (word " Agent " who " LLM error : " error-message " — using deterministic")
235253 decide-belief-deterministic neighbor-beliefs
236254 ]
237255end
@@ -272,6 +290,9 @@ to check-topology-convergence [name group]
272290 if item idx convergence-times != -1 [ stop ]
273291 if converged? group [
274292 set convergence-times replace-item idx convergence-times ticks
293+ print ""
294+ print (word ">>> " name " CONVERGED at tick " ticks " on belief: " [belief] of one-of group " <<<")
295+ print ""
275296 ]
276297end
277298
@@ -307,13 +328,31 @@ to update-tournament-state
307328 if not member? -1 convergence-times [
308329 set tournament-running? false
309330 set winner-topology fastest-topology
331+ print-tournament-results
310332 stop
311333 ]
312334
313335 if ticks >= max-ticks [
314336 set tournament-running? false
315337 set winner-topology fastest-topology
338+ print-tournament-results
339+ ]
340+ end
341+
342+ to print-tournament-results
343+ print ""
344+ print "=== TOURNAMENT RESULTS ==="
345+ print (word "Mode: " llm-status " | Agents per topology: " agents-per-topology)
346+ foreach (range length topology-order) [i ->
347+ let name item i topology-order
348+ let result item i convergence-times
349+ ifelse result != -1
350+ [ print (word " " name ": converged at tick " result) ]
351+ [ print (word " " name ": did NOT converge (max-ticks=" max-ticks ")") ]
316352 ]
353+ print (word "Winner: " winner-topology)
354+ print "==========================="
355+ print ""
317356end
318357
319358to stop-tournament
0 commit comments