-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvolveRun.lean
More file actions
21 lines (18 loc) · 847 Bytes
/
Copy pathEvolveRun.lean
File metadata and controls
21 lines (18 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Eureka
/-!
The population, live: templates, the specializer meta-heuristic, and the
LLM — one agent among many, competing for budget on worth like everyone
else. Its move is to birth heuristics; their discoveries pay it parent
credit. Requires the `aws` CLI with Bedrock access.
Run with `lake env lean EvolveRun.lean`.
-/
open Lean Eureka.Runtime
#eval show MetaM Unit from do
let templates := [identityH, commH, idemH, assocH, distribH, mixerH].map Agent.ofConj
let agents := templates ++
[specializerH, llmOracleAgent (Eureka.LLM.invoke Eureka.LLM.defaultConfig)]
let corpus ← evolve agents { generations := 3, judgeBudget := 50, perAgentCap := 25 }
IO.println ""
IO.println s!"final corpus ({corpus.facts.size} facts):"
for f in corpus.facts do
IO.println s!" {f.name} : {toString (← Meta.ppExpr f.stmt)}"