godel-machine
Schmidhuber''s Gödel Machine: Self-improving systems that prove their
by plurigrid★ 73 GitHub stars
Install godel-machine in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
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:
- Contains a formal proof system (e.g., Lean4, Coq)
- Has a utility function defining "better"
- Can rewrite any part of itself if it proves the rewrite improves utility
- 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:
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)
Key Properties
- Halting Problem: Cannot prove all beneficial rewrites (incompleteness)
- Safety: Only rewrites with proofs are applied
- Bootstrapping: Initial prover must be trustworthy
- Asymptotic Optimality: Converges to optimal policy (given enough time)
End-of-Skill Interface
Integration with Interaction Entropy
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
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 ✓
r2con Speaker Resources
| Speaker | Relevance | Repository/Talk |
|---|---|---|
| cryptax | Malware evolution/mutation | droidlysis |
| unixfreaxjp | Self-modifying malware | r2con malware analysis |
| cmatthewbrooks | Binary mutation analysis | malchive |
References
- Schmidhuber, J. (2003). "Gödel Machines: Self-Referential Universal Problem Solvers."
- Zhang, J. et al. (2025). "Darwin Gödel Machine: Open-Ended Evolution of Self-Improving Agents."
- Schmidhuber, J. (2007). "New Millennium AI and the Convergence of H
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the godel-machine skill do?
Schmidhuber''s Gödel Machine: Self-improving systems that prove their
How do I install the godel-machine skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the godel-machine skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…