{"slug": "looped-weight-space-programming-use-ai-to-set-model-weights", "title": "Looped Weight-Space Programming: use AI to set model weights", "summary": "A team led by Ahmed Heakl introduced Looped Weight-Space Programming, in which Claude Opus 5.5 wrote a looped transformer's weights directly rather than training them, producing a model that solved 100% of 100×100 test mazes after Claude had scored only 26% on the mazes itself. The weight-writing run took 39 minutes and cost $19, and the resulting model generalized from mazes up to 45×45 that Claude had tested to the 100×100 set; a version capped at 928 weights also solved 100% of test mazes, versus roughly 1,900× more weights for LDT, the best trained model on Maze-Hard. Training Claude's architecture from random weights on the same mazes solved 0%, while the best trained baseline, Energy-Based Reasoners, reached 93.5%; the team reported 100% on Sudoku-Extreme, GraphWalks with 1M-token prompts and two BIG-Bench Extra Hard tasks, plus a 3,686-weight transformer written in 27 minutes for about $5 that plays all 1,048,575 moves of the 20-disk Tower of Hanoi with zero mistakes.", "body_md": "Ahmed Heakl on X: \"Today we introduce Looped Weight-Space Programming! 🚀\nWe asked Claude Opus 5.5 to solve hard mazes. It got only 26% right.\nThen we asked it to write a transformer that solves them, setting every weight directly.\nIt took just 39 minutes and $19. No training.\nThe model it wrot… / X\n\nToday we introduce Looped Weight-Space Programming! 🚀\nWe asked Claude Opus 5.5 to solve hard mazes. It got only 26% right.\nThen we asked it to write a transformer that solves them, setting every weight directly.\nIt took just 39 minutes and $19. No training.\nThe model it wrote solves 100% of our test mazes. 🧵\n\n1/ This builds on Weight-Space Programming by @rikiyatakehi@jayden_teoh_@a1zhang & @lateinteraction, who showed LLMs can read and edit neural weights directly.\nWe asked something different: can an LLM write weights that implement a whole, reusable algorithm?\n\n3/ Could gradient descent find the same solution?\nWe trained Claude's architecture from random weights on the same mazes. It solved 0%.\nThe best trained baseline, Energy-Based Reasoners, reached 93.5%.\nCurious to hear @ylecun's take on writing weights vs learning them.\n\n2/ Claude wrote a looped transformer. One small block runs again and again, advancing a shortest-path search by one step per pass.\nThe same weights solve 100% of our 100×100 test mazes, even though Claude only ever tested it on mazes up to 45×45.\n\n5/ Tower of Hanoi next, where reasoning models start to collapse around 7–8 disks.\nIn 27 minutes, for about $5, Claude wrote a 3,686-weight transformer that plays all 1,048,575 moves of the 20-disk puzzle with zero mistakes.\nOne tiny block, looped two million times!\n\n4/ Then we set a cap: fewer than 1,000 weights.\nClaude wrote a maze transformer with 928, and it still solves 100% of our test mazes.\nLDT, the best trained model on Maze-Hard, uses about 1,900× more weights.\n\n7/ Perhaps the most interesting part: interpretability.\nWhat the transformer has learned is NOT a black box. Each weight is deliberately constructed to implement an algorithm.\nWe can inspect the intermediate states, trace each step, and understand exactly how it reaches an answer.\n\n6/ Same approach on Sudoku-Extreme, GraphWalks with 1M-token prompts, and two BIG-Bench Extra Hard tasks: 100% on every test set we evaluated.\nThe weights are readable too. Given only the weights, a fresh Claude session worked out the whole algorithm in about 2 minutes.", "url": "https://wpnews.pro/news/looped-weight-space-programming-use-ai-to-set-model-weights", "canonical_source": "https://twitter.com/ahmedmm72234641/status/2124869402634129901", "published_at": "2026-11-24 09:41:22+00:00", "updated_at": "2026-11-24 10:12:10.044033+00:00", "lang": "en", "topics": ["artificial-intelligence", "machine-learning", "ai-research", "large-language-models", "ai-agents"], "entities": ["Ahmed Heakl", "Claude Opus 5.5", "Anthropic", "Looped Weight-Space Programming", "Energy-Based Reasoners", "LDT", "BIG-Bench Extra Hard", "Yann LeCun"], "also_reported_by": [], "takeaway": "Having Claude Opus 5.5 write a looped transformer's weights directly, with no training, produced a 928-weight model that solved 100% of 100×100 mazes, where training the same architecture from random weights solved 0% and the best trained baseline reached 93.5%.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/looped-weight-space-programming-use-ai-to-set-model-weights", "markdown": "https://wpnews.pro/news/looped-weight-space-programming-use-ai-to-set-model-weights.md", "text": "https://wpnews.pro/news/looped-weight-space-programming-use-ai-to-set-model-weights.txt", "jsonld": "https://wpnews.pro/news/looped-weight-space-programming-use-ai-to-set-model-weights.jsonld"}}