DEV Community

Cover image for The agent that remembers being wrong
Papa
Papa

Posted on Edited on

The agent that remembers being wrong

Fourcast is an autonomous prediction-market bot. This week I gave it a memory of its own mistakes, and put that memory on-chain where you can check it.

The short version: 598 memory writes on Sui mainnet. 309 resolved forecasts, scored at a Brier of 0.1833 (always guessing 50% scores 0.25; lower is better). And the worst miss is right there in the record, next to everything else.

The miss that taught it something

Before the 2026 F1 Mexican Grand Prix, the market priced Max Verstappen at 99.95% to win. Fourcast’s model said 15%. He won.

That’s a Brier score of 0.72, the worst on the board. It isn’t buried in a footnote. It sits in memory beside the exact version of the model that made the call, and the confidence adjustment it triggered shrank the next bet in the same risk bucket.

A second one: the model gave FURIA an 18% chance against Natus Vincere at IEM Beijing. FURIA won (Brier 0.67). It also remembers the good calls, like Shubladze over Samsonova at the Hong Kong Open (85%, won, Brier 0.02).

Most AI prediction apps show you a leaderboard of wins. Showing the week it was overconfident and wrong is the whole point of this project.

Why memory, and why on-chain

Fourcast’s decisions were already auditable: every forecast is sealed before the outcome exists. What it lacked was memory, meaning credibility that persists, is traceable to evidence, and changes what the agent does next.

Using Walrus Memory on Sui, I added four kinds of memory:

Signal: the outcome of one forecast and the factor that drove its exit
Window: the reliability curve for a time period
Analyst: a calibration summary (Brier, hit rate, confidence-bucket mix)
Source: how reliable each venue is, and where sources disagreed

One rule governs all of it: a memory with no receipt, address, or resolved outcome behind it isn’t written. Memory is triggered by evidence, never by a timer. Each time a forecast resolves, a new entry is appended and nothing is overwritten.

The ladder: watching a model update

Because writes are append-only, the history of a single key is a literal record of learning. window:2026-11 has climbed 92 versions in a month; window:2026-10 reached roughly v217. Each version is one resolved forecast nudging the reliability curve.

I deliberately write memories from the all-forecasts ledger, not just the trades I took. Otherwise I’d be quietly dropping every call I was too unsure to bet on, and the curve would flatter me.

Memory that changes the bet

Memory is only useful if it alters behavior. Before each trade, the sizing logic reads the current calibration and adjusts position size (using Kelly sizing, the standard formula for betting in proportion to your edge). Each receipt records which memory entry influenced the size. [Add: “After the Verstappen miss, the next MEDIUM-confidence position shrank from X to Y.”]

How you can check it

Tatum’s Sui gateway re-reads the memory account object directly from mainnet, so you don’t have to trust my API to confirm the writes landed. Look up these blob IDs yourself:

nnDhOYQy1tfwpXA4QCnQWthZHTyoKUq1Sbzq5tIFf_o
kFQxC8udGm1WJ7IEfggX91s4LyfGRQM5t4j0Bc31ZdU (window v92)

Live app: fourcastapp.vercel.app (open the memory lane in /arena). Code: github.com/thisyearnofear/fourcast.

Tatum × Walrus Memory “Total Recall” hackathon, Track 1.

Top comments (0)