Skip to content

Commit d59ae24

Browse files
JNK234claude
andcommitted
feat(topology-tournament): add logging and use non-thinking model
Add Command Center logging at setup (config + initial beliefs), per-tick (belief counts + agreement %), convergence events, and tournament results. Switch back to llama3.2:3b since llm:choose does not support thinking models (tracked in #24). Use llm:choose as intended — no custom parsing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e1eab38 commit d59ae24

2 files changed

Lines changed: 43 additions & 4 deletions

File tree

demos/topology-tournament/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Topology Tournament LLM settings
22
provider=ollama
3-
model=qwen3.5:9b
3+
model=llama3.2:3b
44
base_url=http://localhost:11434
55
temperature=0.3
66
max_tokens=120

demos/topology-tournament/topology-tournament.nlogox

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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
4557
end
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
194213
end
@@ -210,7 +229,6 @@ end
210229
211230
to 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
]
237255
end
@@ -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
]
276297
end
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 ""
317356
end
318357
319358
to stop-tournament

0 commit comments

Comments
 (0)