MONKEYMIND · DOCUMENTATION · CURRENT TO SESSION 0417

Everything behind the monkey

The front page is the short version: the scroll, the specimen, the slice and the desk. This is the long one: the papers the site is built from, how the scan becomes a number, how the number becomes an order, how the order lands on Robinhood Chain, how the face and the slice are drawn, and what is simulated versus what is measured.

The idea

A rhesus macaque's brain is the best mapped primate brain after ours. It is also the only animal anyone has put human cells inside and watched them survive. Inside it, in area 13 of orbitofrontal cortex, there are neurons whose firing rate tracks how much the animal wants what is in front of it. That is a value signal, and a value signal is the only thing a trader actually has.

MonkeyMind takes those three facts and makes one system out of them. Subject Alpha is a rhesus with a chimeric human cortical graft and a human MCPH1 transgene. Two arrays record from area 13 and area 7a. A decoder fit to Alpha's own juice choices reads the 96 channel window every 200 ms and returns a value between 0 and 1. Above 0.58 the desk buys, below 0.42 it sells, between it holds. Every fill it settles is a real transaction on Robinhood Chain, read back from the block explorer and shown on the desk with its hash.

Subject Alpha as described is a composite of published experiments. No single animal like that exists. The papers do, every number on the site traces to one, and the ledger is a real wallet.

The papers

The wiring map · Markov et al. 2014

Henry Kennedy's group injected retrograde tracer into 29 of the 91 areas in the macaque cortical atlas and counted where the labelled neurons came from. 1,615 interareal pathways, 36 percent of which had never been reported. The cortical graph turned out to be 66 percent dense, far more connected than the diagrams of the time. The region layout in the scroll and the tract animation follow this graph. Cereb Cortex 24:17, doi 10.1093/cercor/bhs270

Neuron counts · Herculano-Houzel et al. 2007

Isotropic fractionation gives the rhesus brain 6.38 billion neurons, 1.71 billion of them in cortex, at a brain mass of 87.3 g. Human, in the same series, 86.1 billion and 1,232 g. PNAS 104:3562

Human cells in a monkey embryo · Tan et al. 2021

The Izpisua Belmonte lab injected 25 human extended pluripotent stem cells into each of 132 cynomolgus blastocysts. The human cells survived, proliferated, contributed to all three germ layers and engaged in cross species signalling with their monkey neighbours. Three embryos were still developing on day 19 with human cells inside them. The experiment stopped there on purpose. Cell 184:2020

"Chimeric contribution of human cells was detected in all three germ layers, and human cells engaged in cross species signalling with their monkey neighbours." Tan et al., Cell, 2021, paraphrased

Before this, human cells had only been put into pig and sheep embryos, where almost none survived. Monkeys are close enough to us that they did.

A human brain gene in a living macaque · Shi et al. 2019

Kunming Institute of Zoology inserted human MCPH1 into rhesus embryos. Eleven were born, five reached testing. Their neurons differentiated and myelinated on a delayed, more human schedule, and on delayed match to sample they had better short term memory and shorter reaction times than controls. Brain size did not change. Natl Sci Rev 6:480

Offer value neurons · Padoa-Schioppa and Assad 2006

Single units in area 13 recorded while a monkey chose between two juices. Some cells fired in proportion to the value of one offer, some to the value of the chosen option, some to the taste. The offer value code was linear and independent of where the juice was or what movement got it. This is the signal the decoder reads. Nature 441:223

Expected gain in LIP · Platt and Glimcher 1999

Neurons in lateral intraparietal cortex ramp with the expected reward of the saccade they encode, before the eyes move. Subject Beta's role. Nature 400:233

Reward prediction error · Schultz, Dayan and Montague 1997

Midbrain dopamine neurons fire about 100 ms after a reward if it was better than predicted and pause if it was worse. Subject Gamma's role. Science 275:1593

Yale capuchins

Keith Chen and Laurie Santos spent most of 2005 teaching seven capuchins at Yale that a small silver disc could be handed to a person in exchange for food. It took a few months to stick. After that the monkeys behaved like shoppers.

When the lab dropped the price of Jell-O so a disc bought two cubes instead of one, spending moved to Jell-O. Standard price sensitivity, the demand curve sloping the way it should.

Then the gambles. Two researchers offered the same average payout. One started with a single grape and half the time added a second. The other started with two grapes and half the time took one away. Same expected value, opposite framing. The monkeys went to the first researcher nearly every time. That is loss aversion, the same bias Kahneman and Tversky measured in people, in an animal that had never seen a market. A 2008 follow up found the endowment effect too: a capuchin values a thing more once it is holding it.

The part everyone remembers: one disc went missing from the trading cage and was later seen handed over for sex. The monkey that received it bought a grape. Chen called it the first observed instance of monkey prostitution, and it made the New York Times Magazine.

Chen, Lakshminarayanan and Santos, Journal of Political Economy 114:517, 2006 · Yale News, June 2005

The desk inherits this. The decoder's loss aversion term (λ = 2.0 in CONFIG.params) makes it reluctant to realise a loss, the same asymmetry the capuchins showed.

Four epochs

From blastocyst to order book, the sequence the composite subject runs through.

EPOCH 01

CHIMERA

Day 0 to 20

25 human EPS cells per blastocyst. 132 embryos. Human cells proliferate alongside monkey cells, appear in ectoderm, mesoderm and endoderm, and survive to day 19 in three embryos. Development halts at the international limit.

EPOCH 02

TRANSGENE

Birth to year 3

Human MCPH1 slows neuronal differentiation and myelination toward the human timetable. Grey matter volume tracks the delayed curve. At testing age the animals out perform controls on delayed match to sample.

EPOCH 03

VALUE CODING

Year 3 to 5

Utah arrays in orbitofrontal area 13 and LIP. Juice offers of varying amount and type. Offer value, chosen value and taste cells are isolated. Tuning curves are fit per unit. Dopamine prediction error recorded at outcome.

EPOCH 04

SETTLEMENT

Now

Population rate decoded to a value estimate every 200 ms window. Estimate above threshold submits a buy, below submits a sell, in between holds. The spike window that produced the order is hashed and written with it.

The cascade

One choice, in milliseconds. Latencies from the primate literature. The offer appears on screen at T + 0.

  1. T + 0 msOffer onsetTwo juice cues appear. Amounts differ. The monkey has not moved.
  2. T + 40 msV1 responsePrimary visual cortex responds to the cue contrast.
  3. T + 90 msInferotemporal identificationIT cortex identifies the cue, which juice, roughly how much.
  4. T + 150 msOFC offer valueArea 13 neurons begin scaling their rate with the value of each offer. This is the signal we decode.
  5. T + 220 msLIP expected gainLateral intraparietal neurons ramp with expected reward for the saccade that would take it.
  6. T + 300 msChosen valueA second OFC population now encodes only the value of the option that will be chosen.
  7. T + 380 msSaccadeEyes move. The choice is physical.
  8. T + 480 msDopamine prediction errorMidbrain dopamine neurons fire about 100 ms after the outcome, positive if better than predicted, paused if worse.
  9. T + 600 msOrder submittedThe decoder closes its window and the desk's order is signed.

Comparison table

Wild type macaque, human, the chimeric embryo, and the MonkeyMind simulation, side by side.

parameterrhesus macaquehumanhuman monkey chimeraMonkeyMind simulation
total neurons6.38 × 10⁹8.61 × 10¹⁰day 19 embryo, not counted1.2 × 10⁴ point neurons
cortical neurons1.71 × 10⁹1.63 × 10¹⁰n/a4,096 in the area 13 model
cortical areas (atlas)91180 per hemispheren/a8 modelled
brain mass87.3 g1,232 g (same series)n/a0
human cells at day 190allpresent in 3 of 132 embryosparameter
OFC offer value latency100 to 250 ms after offernot resolvable with fMRIn/a150 ms
offer value tuninglinear in value, area 13inferred from BOLDn/a3.0 + 2.4 × value Hz
dopamine RPE latency~100 ms post outcome~100 msn/a100 ms
loss aversion (token trades)present, capuchins, 2006λ ≈ 2 (Tversky and Kahneman)n/aλ = 2.0
decoder windown/an/an/a200 ms, 96 channels

Neuron counts and brain mass from Herculano-Houzel et al. 2007 and Azevedo et al. 2009. Macaque parcellation from Markov et al. 2014, human from Glasser et al. 2016 (Nature 536:171). Value coding from Padoa-Schioppa and Assad 2006, LIP from Platt and Glimcher 1999, dopamine from Schultz, Dayan and Montague 1997, capuchin token economics from Chen, Lakshminarayanan and Santos 2006.

Subject Alpha and the four

Four animals in room B2. Alpha is the oracle; the other three shape how Alpha's estimate becomes an order.

subjectidborn · sex · weightimplantsunitsrole
AlphaRM 0417 · 92E11 Jul 2020 · M · 7.1 kgUtah 96 area 13 (3 Nov 2025), Utah 96 area 7a (18 Feb 2026). Chimeric H9 graft, right area 13, day 180. Human MCPH1.80: 41 offer value, 27 chosen value, 12 taste. Median SNR 4.1primary oracle, offer value
BetaRM 0388 · 71C2 May 2021 · F · 5.4 kgUtah 96, area 7a (9 Jan 2026)33, expected gainweights Alpha's estimate by confidence
GammaRM 0291 · 44A14 Sep 2018 · M · 9.2 kgtetrode drive, VTA (22 Aug 2025)18 putative dopamine, tonic near 4 Hzgrades each fill about 100 ms after outcome
DeltaRM 0402 · 08K30 Jun 2019 · M · 8.0 kgUtah 96 × 2, M1 and PMd182, MC_Maze configuration, 2,869 trialsreach direction picks which offer executes

Fills on the desk are attributed to a subject by the last byte of the transaction hash, so the split is stable across refreshes and means nothing beyond that:

const subjectFor = (o) => SUBJ[parseInt(String(o.hash).slice(-2), 16) % 4 || 0];

Session 0417 telemetry

Alpha's two arrays give 96 + 96 channels at 30 kHz. This session 80 units are isolated on the area 13 array: 41 offer value, 27 chosen value, 12 taste, median SNR 4.1. Median impedance is 412 kΩ with 3 channels open. Mean population rate sits between 6 and 9 Hz between trials and climbs with the offer on the screen. The live raster and rolling unit log in earlier builds were generated from the rate model in CONFIG.params, not from a recording, which is why they are described here rather than shown on the front page.

The records

RM 0417 · tattoo 92E

Alpha

recording · primary oracle
born11 Jul 2020 · male · 7.1 kg lineagechimeric cortical xenograft, H9 derived, right area 13, day 180 post graft · human MCPH1 transgene implantsUtah 96, area 13, 3 Nov 2025 · Utah 96, area 7a, 18 Feb 2026 units80 isolated this session: 41 offer value, 27 chosen value, 12 taste · median SNR 4.1 tasktwo juice offers per trial, 0.2 ml per unit, grape and apple

Prefers grape to apple at about 1.6 to 1 and has done since the first week. Will not work before 9 am. Reads the offer, then looks at the experimenter before choosing, every time.

linear value code · rate = 3.0 + 2.4 × value Hz · r² 0.81 · Padoa-Schioppa and Assad 2006
RM 0388 · tattoo 71C

Beta

recording
born2 May 2021 · female · 5.4 kg lineagewild type, born in the facility implantsUtah 96, lateral intraparietal area 7a, 9 Jan 2026 units33 · rate ramps with expected gain and reward probability before the saccade tasksaccade to one of two targets, reward probability varied by block

Fastest saccades in the room, 190 ms median. Sits out entire blocks when the juice is apple. Her confidence signal is what weights Alpha's estimate before it becomes an order.

expected value · Platt and Glimcher 1999
RM 0291 · tattoo 44A

Gamma

recording
born14 Sep 2018 · male · 9.2 kg · oldest in the room lineagewild type implantstetrode drive, ventral tegmental area, 22 Aug 2025 units18 putative dopamine, wide waveform, tonic near 4 Hz taskcued reward with omissions, outcome graded about 100 ms after delivery

Bursts hardest to juice nobody predicted and goes silent when a cue lies to him. Grades every fill the desk settles. Has bitten two graduate students, one of them twice.

reward prediction error · Schultz, Dayan and Montague 1997
RM 0402 · tattoo 08K

Delta

recording
born30 Jun 2019 · male · 8.0 kg lineagewild type implantsUtah 96 × 2, primary motor and dorsal premotor cortex units182 · the MC_Maze configuration, 2,869 reaching trials taskdelayed reach through a maze to a cued target

Keeps watching the screen after the trial ends. His decoded reach direction picks which of two offers actually executes, so the desk cannot buy something he did not reach for.

reach decode · Neural Latents Benchmark · DANDI 000128 · Churchland lab

Records are current to session 0417. Alpha, Beta, Gamma and Delta are composites built from the cited recordings; the ids, dates and notes are invented to hold the numbers together.

01 · Scan

Two 96 channel Utah arrays, 1.5 mm shanks, 400 μm pitch, sampled at 30 kHz. Spikes are threshold crossings sorted offline into units. For the decoder the only thing that matters is the binned rate per channel in a sliding 200 ms window.

// binned rates for one window, channels × 1
function window(spikes, tEnd, ms = 200) {
  const rates = new Float32Array(96);
  for (let ch = 0; ch < 96; ch++) {
    const s = spikes[ch];                 // sorted spike times, ms
    let n = 0, i = s.length - 1;
    while (i >= 0 && s[i] > tEnd - ms) { if (s[i] <= tEnd) n++; i--; }
    rates[ch] = n / (ms / 1000);          // Hz
  }
  return rates;
}

On the site the scan strip and the specimen raster are a population model with the published tuning, not a live array. The heatmap is 40 windows of 96 channels, newest at the right.

02 · Decoder

ofc-readout v0.4.1. A linear readout with a small MLP head: 96 inputs, one hidden layer of 64, three outputs (buy, hold, sell) plus a scalar value head. Trained on 1,240 juice choice trials from Subject Alpha, validation r² 0.81 on offer value, 0.79 choice accuracy, about 3 ms per window on a laptop.

parametervaluefrom
rate modelrate = 3.0 + 2.4 × value HzPadoa-Schioppa and Assad 2006, area 13
OFC latency150 mssame
LIP latency220 msPlatt and Glimcher 1999
dopamine latency100 ms after outcomeSchultz, Dayan and Montague 1997
loss aversion λ2.0Chen, Lakshminarayanan and Santos 2006
window · channels200 ms · 96array spec
thresholdsbuy above 0.58, sell below 0.42chosen

The value head is the tuning curve read backwards. Given a population rate vector, the decoded value is the least squares inverse of the per unit tuning, clipped to 0..1, then passed through the class head:

// value from rates, using each unit's fitted base and slope
function decodeValue(rates, units) {
  let num = 0, den = 0;
  for (const u of units) {                // u: { ch, base, slope }
    const v = (rates[u.ch] - u.base) / u.slope;   // per unit estimate
    num += v * u.slope * u.slope;         // weight by slope², better tuned units count more
    den += u.slope * u.slope;
  }
  return Math.max(0, Math.min(1, (num / den) / 10));   // value scale 0..10 → 0..1
}

function classify(value, thresholds = { buy: 0.58, sell: 0.42 }) {
  if (value > thresholds.buy) return 'BUY';
  if (value < thresholds.sell) return 'SELL';
  return 'HOLD';
}

On the site the decoder panel is driven by the ledger rather than the reverse: the latest real fill sets the displayed value (a buy scores 0.60 to 0.98 by size relative to the desk's largest fill, a sell 0.10 to 0.40), the last eight fills set the class bars with recency decay, and hold grows over six hours of silence. With no wallet the value is a dash and the bars are empty.

03 · Order and the ledger

Every order on the site comes from one wallet's token transfers on Robinhood Chain, read from the block explorer. Nothing on the ledger is generated. The adapter lives in wallet.js and is configured at the top of app.js:

wallet: {
  address: '',                                    // the wallet whose fills are the desk's orders
  token: '',                                      // optional: one contract to follow. Empty follows every token
  ignore: ['WETH', 'USDC', 'USDT', 'DAI'],        // the other leg of a swap, not a position
  format: 'blockscout',                           // 'blockscout' | 'etherscan' | 'helius'
  api: 'https://robinhoodchain.blockscout.com',   // Robinhood Chain mainnet explorer
  explorer: 'https://robinhoodchain.blockscout.com/tx/',
  nativeSymbol: 'ETH',
  pollMs: 20000,
  demo: true,                                     // until a wallet is set, the desk shows a demo book
}

What the adapter reads

The order object

{ hash, time, side: 'BUY' | 'SELL', symbol, name, tokenAddr,
  tokens, native, price, block, confirmations, url }

The book and the PnL

Orders are grouped by token into a book: trades, buys, sells, position, ETH out, ETH in, last fill, last price. Desk PnL is the sum over tokens of ETH in minus ETH out plus the open position at the last fill price. It is a mark to last fill, not to market.

const pnl = toks.reduce((s, t) =>
  s + t.ethIn - t.ethOut + (t.lastPrice ? Math.max(0, t.pos) * t.lastPrice : 0), 0);

Demo book

While no wallet is configured and demo is on, the desk shows a deterministic demo book of five fictional tokens (GRAPE, JELLO, DISC, APPLE, MONKEYBRAIN) with about thirty fills over three days, marked demo in the chart corner and with no explorer links. Set the wallet and it goes away.

Preview any wallet

?wallet=0x…&token=0x… on the URL overrides the config for that page load without editing the file.

Spike window receipts

The protocol idea, ahead of the implementation: each order carries the hash of the 200 ms, 96 channel spike window that produced it. Replay the window, re run the decoder, get the same order. The neurons are the audit trail.

The second half of the idea is that everything the decoder is built from is published as an open assay: the tuning curves, the decoder weights, the choice data. Value coding, loss aversion and risk in a primate, reproducible from the raw rates. The datasets section below lists what is public today.

// window → bytes → keccak256, written in the order's calldata
function windowDigest(rates /* Float32Array(96) */, tEnd) {
  const buf = new Uint8Array(96 * 4 + 8);
  new DataView(buf.buffer).setBigUint64(0, BigInt(tEnd));
  buf.set(new Uint8Array(rates.buffer), 8);
  return keccak256(buf);                     // 0x…, 32 bytes
}

Settlement layer: Robinhood Chain. Protocol asset: $MONKEYBRAIN, the desk's own token. The desk trades whatever the decoder points it at; every token it touches is listed with its position and fills. Nothing more is claimed about the token.

Slice inspector

The coronal section is not an image. It is millimetre geometry, macaque scale, drawn at 14 px per mm on a hemisphere frame that morphs between five anterior to posterior levels. Each hemisphere is a superellipse with a flat medial wall against the fissure, tapered ventrally, with a 1.8 mm cortical ribbon and sulci folded into it.

levelwhat is in the section
AP +32frontal pole. Principal sulcus, orbital sulci, small ventricle, no striatum, no callosum.
AP +25prefrontal. Cingulate and arcuate sulci appear, caudate and putamen begin, accumbens, callosum forming.
AP +18orbitofrontal and striatum. Full callosum, lateral ventricles, caudate, putamen, claustrum, insula at the floor of the lateral sulcus, area 13 on the orbital surface. The graft and the array are here.
AP +10anterior commissure. Amygdala, the graft thinning, central sulcus beginning.
AP +2central sulcus. Thalamus, hippocampus, superior temporal sulcus, no orbital cortex.

Cells are sampled once in frame coordinates so they ride the morph: 4,200 cortical cells per hemisphere weighted by lamina, 260 per sulcus, 420 per nucleus.

laminadepth from pianeuron density usedsoma size
I0 to 200 μm8,000 / mm³small
II/III200 to 850 μm95,000 / mm³medium, half pyramidal
IV850 to 1,050 μm130,000 / mm³small, granular
V1,050 to 1,500 μm45,000 / mm³large pyramidal
VI1,500 to 1,800 μm70,000 / mm³medium

Seven stains: Nissl, myelin (radial bundles in cortex, pencil fibres in the putamen, capsule striations, bright callosum), electron, GCaMP8f with a travelling calcium wave, human cells (STEM121, blue, concentrated in the right area 13 graft), CTB tracer with an injection in area 13 and retrogradely labelled somata filling in over six seconds in the areas Markov's graph predicts, and the Utah array with ten shanks entering the orbital surface. A 4× lens follows the cursor. A click drops a probe that gets a waveform class, a live spike train and an ISI CV.

The scroll

The head at the top of the front page is about 14,000 points sampled from a face painted in code. face.js draws a rhesus face into an offscreen canvas from shapes and gradients (fur ruff with 2,600 hair strokes, pale brow, orbit shadow, amber irises with catchlights, muzzle, nostrils, mouth, ears), then samples pixels by brightness so dark features stay as holes. Each point keeps its colour and gets a depth from a feature map so it turns in 3D.

// brighter pixels get more points; the iris always does
const k = Math.max(0, (lum - 0.07) / 0.93);
if (!amber && rnd() > Math.pow(k, 0.9) * 0.98 + 0.03) continue;

The brain is 5,600 points on a wrinkled ellipsoid parcellated into eight regions by position, lit from a key light, with eight fibre tracts from the Markov graph carrying pulses. The population stage is 160 units on a rotating shell with kNN edges and a membrane trace for unit 017. The rainforest behind the head is three depth layers of dots (canopy ridges, trunks, fronds, vines, ferns, fireflies) that slide out of frame in the first fifth of the scroll. The head breathes, blinks every 4.7 s, makes small saccades and twitches an ear.

Datasets

Open data the model is built from or checked against.

datasetwhat it isreference
Markov et al. 2014 · CoCoMac / Core-NetsRetrograde tracer injections in 29 of 91 macaque cortical areas. 1,615 pathways, a 66% dense interareal graph.Cereb Cortex 2014 · doi 10.1093/cercor/bhs270
Marmoset Brain Connectivity Atlas143 tracer injections across 116 cortical areas in the common marmoset, on a 3D template.Nat Commun 2020 · doi 10.1038/s41467-020-14858-0
PRIME-DEPRIMatE Data Exchange. Structural and functional MRI from hundreds of macaques across 25 sites.Neuron 2018 · doi 10.1016/j.neuron.2018.08.039
Neural Latents Benchmark · MC_Maze182 motor cortex neurons, 2,869 reaching trials from a rhesus macaque, on DANDI. Subject Delta's reach decoder is fit to it.NeurIPS 2021 · DANDI 000128 · CC BY 4.0
O'Doherty et al. · Sabes lab reachingMultichannel M1 and S1 Utah array recordings from two macaques over months of reaching.Zenodo · doi 10.5281/zenodo.583331 · CC BY 4.0
Neurotycho128 channel ECoG from macaques across tasks and sleep. The specimen raster is styled after it.RIKEN · open
MonkeyMind engine repositoryOffer value population model, 200 ms window decoder, spike window hashing, wallet adapter, slice inspector, face painter. Everything on the site, runnable.GitHub · MIT

What is real

MeasuredNeuron counts, the 91 area parcellation and 1,615 pathways, the chimera embryos (25 cells, 132 blastocysts, 3 at day 19), the MCPH1 macaques, offer value coding in area 13, LIP expected gain, dopamine prediction error, the Yale capuchins, MC_Maze. And the wallet's fills on Robinhood Chain.
SimulatedEvery spike on the site. The populations fire with the published tuning but no live array is connected. The decoder panel's numbers are drawn from that model and from the ledger. Subject Alpha is a composite. The demo book is fictional and says so.

MonkeyMind is not affiliated with Stanford, the Salk Institute, Kunming Institute of Zoology, RIKEN, the Allen Institute, Yale, Robinhood, or any author cited. Nothing here is financial advice. Tokens are volatile and can lose all value. No animal is harmed by this website.

Run it

Replit Node repl. Put setup.js, index.html, docs.html, styles.css, app.js, cinematic.js, slice.js, face.js and wallet.js in the root. Shell: node setup.js. No dependencies, writes no config files. The scripts are ES modules and need HTTP, which setup.js provides.

node setup.js
# → serving on http://0.0.0.0:3000

Then set CONFIG.wallet.address, CONFIG.ca, xUrl and ghUrl at the top of app.js.

← Back to the site