godel-machine
Schmidhuber's Gödel Machine: Self-improving systems that prove their own improvements. Darwin Gödel Machine (DGM) combines evolution with formal verification.
Best use case
godel-machine is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Schmidhuber's Gödel Machine: Self-improving systems that prove their own improvements. Darwin Gödel Machine (DGM) combines evolution with formal verification.
Teams using godel-machine should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/godel-machine/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How godel-machine Compares
| Feature / Agent | godel-machine | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Schmidhuber's Gödel Machine: Self-improving systems that prove their own improvements. Darwin Gödel Machine (DGM) combines evolution with formal verification.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Gödel Machine Skill
> *"A Gödel Machine can rewrite any part of itself, including the learning algorithm, provided it can first prove that the rewrite is beneficial."*
> — Jürgen Schmidhuber
## Overview
The **Gödel Machine** is a self-improving system that:
1. Contains a **formal proof system** (e.g., Lean4, Coq)
2. Has a **utility function** defining "better"
3. Can **rewrite any part of itself** if it proves the rewrite improves utility
4. The proof constraint prevents reckless self-modification
## Core Architecture
```
┌─────────────────────────────────────────────────────┐
│ GÖDEL MACHINE │
├─────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ │
│ │ Policy │───▶│ Prover │ │
│ │ (current) │ │ (verifier) │ │
│ └─────────────┘ └──────┬──────┘ │
│ ▲ │ │
│ │ ┌──────▼──────┐ │
│ │ │ Candidate │ │
│ │ │ Policy │ │
│ │ └──────┬──────┘ │
│ │ │ │
│ ┌──────┴──────┐ ┌──────▼──────┐ │
│ │ Rewrite │◀────│ Utility │ │
│ │ if proof │ │ Check │ │
│ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────┘
```
## Darwin Gödel Machine (DGM)
Combines **evolutionary search** with **formal proofs**:
```python
class DarwinGodelMachine:
"""
DGM: Open-ended evolution of self-improving agents.
Archive of agents, LLM-based mutation, fitness evaluation,
keep if novel and beneficial.
"""
def __init__(self, initial_agent: Agent, prover: TheoremProver):
self.archive = [initial_agent]
self.prover = prover
self.generation = 0
def evolve_step(self) -> Agent:
# Sample parent from archive (fitness-proportionate)
parent = self.sample_archive()
# LLM-based mutation
child = self.llm_mutate(parent)
# Evaluate on benchmarks
fitness = self.evaluate(child)
# Optionally: verify improvement formally
if self.prover.can_prove(f"utility({child}) > utility({parent})"):
child.proven = True
# Add if novel and good
if self.is_novel(child) and fitness > 0:
self.archive.append(child)
return child
def llm_mutate(self, agent: Agent) -> Agent:
"""Use LLM to generate improved version."""
prompt = f"""
Current agent code:
{agent.code}
Current fitness: {agent.fitness}
Suggest an improvement to make this agent better.
Return only the improved code.
"""
new_code = self.llm.generate(prompt)
return Agent(code=new_code, generation=self.generation + 1)
```
## GF(3) Triads
```
# Self-Improvement Triads
kolmogorov-compression (-1) ⊗ cognitive-superposition (0) ⊗ godel-machine (+1) = 0 ✓
proofgeneral-narya (-1) ⊗ self-evolving-agent (0) ⊗ godel-machine (+1) = 0 ✓
sheaf-cohomology (-1) ⊗ epistemic-arbitrage (0) ⊗ godel-machine (+1) = 0 ✓
```
## Integration with Interaction Entropy
```ruby
module GodelMachine
def self.attempt_improvement(current_policy, seed)
gen = SplitMixTernary::Generator.new(seed)
color = gen.next_color
# Generate candidate via color-guided mutation
candidate = mutate(current_policy, color)
# Attempt proof
proof = attempt_prove(candidate, current_policy)
if proof[:success]
{
improved: true,
new_policy: candidate,
proof: proof[:theorem],
trit: 1 # Generator role
}
else
{ improved: false, reason: proof[:failure_reason] }
end
end
end
```
## Key Properties
1. **Halting Problem**: Cannot prove all beneficial rewrites (incompleteness)
2. **Safety**: Only rewrites with proofs are applied
3. **Bootstrapping**: Initial prover must be trustworthy
4. **Asymptotic Optimality**: Converges to optimal policy (given enough time)
## References
1. Schmidhuber, J. (2003). "Gödel Machines: Self-Referential Universal Problem Solvers."
2. Zhang, J. et al. (2025). "Darwin Gödel Machine: Open-Ended Evolution of Self-Improving Agents."
3. Schmidhuber, J. (2007). "New Millennium AI and the Convergence of History."Related Skills
zx-calculus
Coecke's ZX-calculus for quantum circuit reasoning via string diagrams with Z-spiders (green) and X-spiders (red)
zulip-cogen
Zulip Cogen Skill 🐸⚡
zls-integration
zls-integration skill
zig
zig skill
zig-syrup-bci
Multimodal BCI pipeline in Zig: DSI-24 EEG, fNIRS mBLL, eye tracking IVT, LSL sync, EDF read/write, GF(3) conservation
zig-programming
zig-programming skill
zeroth-bot
Zeroth Bot - 3D-printed open-source humanoid robot platform for sim-to-real and RL research. Affordable entry point for humanoid robotics.
xlsx
Comprehensive spreadsheet creation, editing, and analysis with support
wycheproof
Google's Wycheproof test vectors for cryptographic implementation testing.
Writing Hookify Rules
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
worldmat-tidar
worldmat-tidar
worlding
Gay.jl world_ pattern: persistent composable state builders with GF(3) conservation, Möbius invertibility, and Narya verification