import {escape} from './common.js'; export const categories=[ {id:'games',name:'Games',kicker:'PLAY & LEARN',count:'6 ways to play',description:'Train an AI player, draw a racetrack, or challenge your own attention.',intro:'A little play. A lot of learning.',items:['flappy','crossy','mario','racer','arcade','attention']}, {id:'networks',name:'Neural Networks',kicker:'BUILD & EXPERIMENT',count:'3 hands-on experiments',description:'Draw a pattern, grow connections, and watch a network learn.',intro:'Make a connection. See what changes.',items:['pictionary','garden','plasticity']}, {id:'explanations',name:'Brain Explanations',kicker:'LOOK INSIDE',count:'7 activities · 27 brain labels',description:'Explore brain structures, fire a model neuron, investigate perception, and learn from surprise.',intro:'Meet the parts. Understand the connections.',items:['brain','neuron-signals','brain-circuit','blind-spot','prediction-learning','drugs','anatomy']}, {id:'research',name:'Brain & AI Research',kicker:'EXPLORE THE POSSIBILITIES',count:'2 research experiences',description:'Turn films into brain predictions and brain patterns into pictures.',intro:'What can AI tell us about the brain?',items:['cinema','mindeye']}, {id:'jewish',name:'Jewish Learning & the Mind',kicker:'GEMARA & COMMENTARY',count:'4 guided explorations',description:'Explore Gemara, Rashi, Rambam, and Tanya on learning, memory, questions, and the inner life.',intro:'Open a source. Ask a question. Make a connection.',items:['jewish-memory','jewish-chavruta','jewish-choice','jewish-understanding']} ]; const descriptions={ flappy:'Launch a flock and teach it when to flap. Compare your learner with new pipe courses.', crossy:'Help a flock learn to read moving traffic in a colorful 3D world.', mario:'Choose a course and train a whole class of Mario agents. Or take the controls yourself.', racer:'Draw your own circuit, launch a fleet, and watch a driver learn from experience.', arcade:'Play Pong against a spiking network and see the signals behind its moves.', attention:'Ignore distracting words, repeat growing patterns, and explore your own responses.', pictionary:'Draw something and watch an AI work through its guesses. Add a hint to change the evidence.', garden:'Teach a tiny network your pixel patterns and inspect its changing connections.', plasticity:'Remove a pathway, test what changes, and retrain the connections that remain.', brain:'Turn, open, and explore a 3D brain. Follow illustrated routes and try a location challenge.', drugs:'Compare chemical messages and explore how different substances change a model synapse.', anatomy:'Find all 27 required structures, read their roles, and print your anatomy labels.', cinema:'Watch a film alongside an AI’s predicted brain response. Compare pictures with sound.', mindeye:'Match images reconstructed from brain recordings, or make a new coarse reconstruction.' }; export function categoryFor(id){return categories.find(c=>c.items.includes(id))} export function categoryArt(id){ const head=''; } export function homeCards(root){ root.innerHTML=`
FIVE WAYS TO EXPLOREChoose what sparks your curiosity
${categories.map((c,i)=>`
0${i+1}${c.kicker}
${categoryArt(c.id)}

${c.name}

${c.description}

${c.count}
`).join('')}
`; } export function recommendedCards(root){ const picks=[ {id:'crossy',category:'games',name:'Crossy Road RL',tag:'TRAIN AN AI',description:'Help an AI learn when to hop through moving traffic, then try crossing the road yourself.'}, {id:'pictionary',category:'networks',name:'Neural Pictionary',tag:'DRAW & DISCOVER',description:'Draw anything and watch AI make its guesses. Add a hint and see how its answer changes.'}, {id:'brain',category:'explanations',name:'3D Brain Explorer',tag:'LOOK INSIDE',description:'Rotate and open a 3D brain. Select a part to discover where it is and what it does.'}, {id:'cinema',category:'research',name:'Neural Cinema',tag:'WATCH & EXPLORE',description:'Watch short clips with sound alongside saved AI predictions of how a brain might respond.'} ]; root.innerHTML=``; } export function activityCards(root,category,experiments){ const extra={id:'anatomy',icon:'◉',name:'The Anatomy Checklist',tag:'27 PARTS · EXPLAINED'}; root.innerHTML=`
${category.name.toUpperCase()}${category.items.length} things to explore
${category.items.map(id=>{const e=experiments.find(e=>e.id===id)||extra;return `${escape(e.tag)}

${escape(e.name)}

${escape(descriptions[id]||e.description)}

${id==='anatomy'?'Explore the labels':'Open activity'}
`}).join('')}
`; }