Skip to content

Commit 97f7345

Browse files
authored
feat: improve agent behavior && add new physics knowledge (#34)
Signed-off-by: wiseaidev <oss@wiseai.dev>
1 parent 9e0f454 commit 97f7345

12 files changed

Lines changed: 708 additions & 103 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,7 @@ build/
3535
*.egg-info/
3636
dist/
3737
wheels/
38-
*.so
38+
*.so
39+
recordings/
40+
server.*
41+
environment_files/

Cargo.lock

Lines changed: 81 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ members = [
77
]
88
exclude = [
99
"target",
10+
"examples/arc-lmm-agent",
11+
"examples/chat",
1012
]
1113

1214
[workspace.dependencies]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![LMM](https://wiseai.dev/assets/logo.png)](https://wiseai.dev)
66

77
[![Work In Progress](https://img.shields.io/badge/Work%20In%20Progress-orange)](https://github.com/wiseaidotdev/lmm)
8-
[![ASI](https://img.shields.io/badge/ASI-10.71%25-brown)](https://arcprize.org/replay/8471c865-4c54-40c5-a523-dcaa681aa4f1)
8+
[![ASI (Best Run)](https://img.shields.io/badge/ASI-14.55%25-brown)](https://arcprize.org/replay/69c86b04-c9ff-4ae2-98e8-eade2e4c2214)
99
[![Crates.io](https://img.shields.io/crates/v/lmm.svg)](https://crates.io/crates/lmm)
1010
[![Docs.rs](https://docs.rs/lmm/badge.svg)](https://docs.rs/lmm)
1111
[![Crates.io Downloads](https://img.shields.io/crates/d/lmm)](https://crates.io/crates/lmm)

examples/arc-lmm-agent/Cargo.lock

Lines changed: 12 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/arc-lmm-agent/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ name = "arc-lmm-agent"
1515
path = "src/main.rs"
1616

1717
[dependencies]
18-
lmm-agent = { path = "../../lmm-agent" }
18+
lmm-agent = { version = "0.1.2" }
1919
arc-agi-rs = { version = "0.1.0" }
2020
tokio = { version = "1.52.1", features = ["full"] }
2121
anyhow = "1.0.102"
@@ -24,6 +24,6 @@ serde_json = "1.0.149"
2424
tracing = "0.1"
2525
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
2626
clap = { version = "4.6.1", features = ["derive"] }
27-
rand = "0.8.5"
28-
indicatif = "0.18"
29-
owo-colors = "4"
27+
rand = "0.10.1"
28+
indicatif = "0.18.4"
29+
owo-colors = "4.3.0"

examples/arc-lmm-agent/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
# 🕹️ arc-lmm-agent
44

5-
[![ASI](https://img.shields.io/badge/ASI-10.71%25-brown)](https://arcprize.org/replay/8471c865-4c54-40c5-a523-dcaa681aa4f1)
5+
[![ASI (Best Run)](https://img.shields.io/badge/ASI-14.55%25-brown)](https://arcprize.org/replay/69c86b04-c9ff-4ae2-98e8-eade2e4c2214)
66
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](../../LICENSE)
77

8-
[![ls20-arc-lmm.gif](./assets/ls20-arc-lmm.gif)](https://arcprize.org/replay/8471c865-4c54-40c5-a523-dcaa681aa4f1)
8+
[![ls20-arc-lmm.gif](./assets/ls20-arc-lmm.gif)](https://arcprize.org/replay/69c86b04-c9ff-4ae2-98e8-eade2e4c2214)
99

1010
> `arc-lmm-agent` is an autonomous navigation solver for ARC-AGI interactive environments (`ls20` game atm). It uses an episodic framework, progressive strategy learning, and robust world modeling to dynamically maneuver through complex grids, interact with rotation modifiers, systematically collect step-boosters, and reach the target zones across escalating levels.
1111
@@ -94,8 +94,8 @@ When all else fails (no plan, no known targets, nothing visible on radar), the a
9494
The solver natively utilizes the overarching `lmm-agent` architecture for generalized intelligence logic:
9595

9696
1. **`InternalDrive`**: The agent fires intrinsic reward/motivation signals. If the agent finds a new bonus position or discovers a completely unvisited tile, the `Curiosity` drive spikes. If the agent bumps into a newly discovered wall and loses a turn, the `Incoherence` drive registers the penalty, adjusting future behavioral tolerances.
97-
2. **`KnowledgeIndex` (Cross-Level Transfer)**: As the agent completes `Level N`, it synthesizes the trial's metadata into narrative English (e.g. *"Level 0 completed after 1 mod interactions and 0 bonuses... "*). This raw text is dynamically ingested into the localized `KnowledgeIndex`. When `Level N+1` begins, this long-term semantic memory primes the agent about the nature of the puzzles it will likely encounter.
98-
3. **`LearningEngine` (HELM)**: Traditional tabular Q-learning shapes underlying values. The agent emits a continuous localized Bellman reward stream (+10 for activating a modifier, +50 for moving closer to the target post-modifier, -1.0 for wall collisions) to fine-tune the `NOVELTY` fallback recommendations.
97+
1. **`KnowledgeIndex` (Cross-Level Transfer)**: As the agent completes `Level N`, it synthesizes the trial's metadata into narrative English (e.g. *"Level 0 completed after 1 mod interactions and 0 bonuses... "*). This raw text is dynamically ingested into the localized `KnowledgeIndex`. When `Level N+1` begins, this long-term semantic memory primes the agent about the nature of the puzzles it will likely encounter.
98+
1. **`LearningEngine` (HELM)**: Traditional tabular Q-learning shapes underlying values. The agent emits a continuous localized Bellman reward stream (+10 for activating a modifier, +50 for moving closer to the target post-modifier, -1.0 for wall collisions) to fine-tune the `NOVELTY` fallback recommendations.
9999

100100

101101
## 🕹️ Run the agent
234 KB
Loading

examples/arc-lmm-agent/src/display.rs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,3 +400,36 @@ pub fn print_plan_invalidated() {
400400
"Plan invalidated (wall/unavailable)".dimmed()
401401
);
402402
}
403+
404+
/// Prints when a launch-pedal is detected from a large position jump.
405+
pub fn print_pedal_detected(from: (usize, usize), to: (usize, usize), delta: usize) {
406+
eprintln!(
407+
" {} {} {} → {} {}",
408+
"⚡".yellow().bold(),
409+
"PEDAL detected".bright_yellow().bold(),
410+
format!("({},{})", from.0, from.1).bright_white(),
411+
format!("({},{})", to.0, to.1).bright_white(),
412+
format!("Δ={delta}px").dimmed(),
413+
);
414+
}
415+
416+
/// Prints when a colorful novel object is discovered during exploration.
417+
pub fn print_novel_object_found(pos: (usize, usize)) {
418+
eprintln!(
419+
" {} {} {}",
420+
"🎨".dimmed(),
421+
"Novel object found".bright_cyan().bold(),
422+
format!("at ({},{})", pos.0, pos.1).bright_white(),
423+
);
424+
}
425+
426+
/// Prints when the agent learns that touching a novel object re-colors the target.
427+
pub fn print_novel_object_learned() {
428+
eprintln!(
429+
" {} {}",
430+
"🧩".dimmed(),
431+
"LEARNED: novel object changes target color!"
432+
.bright_green()
433+
.bold(),
434+
);
435+
}

0 commit comments

Comments
 (0)