A visual explanation of reinforcement learning
Web page · https://aatishb.com/myriad/how-brains-learn
First seen by Oriel on .
AI summary
The article demonstrates reinforcement learning with a four-neuron digital creature, showing how reward and punishment can teach it to seek, avoid, or charge toward light.
- The spark’s behavior is controlled by three parameters: straight and crossed connection strengths between its eyes and flippers, plus a drive that sets its speed without light.
- Each trial randomly perturbs the parameters; performance is compared with a running average, and the parameters shift with or against the perturbation according to the result.
- After 2,000 tries, sparks can learn to follow light, though learning paths include random steps, setbacks, and thousands of trials for some learners.
- Changing the reward changes the learned behavior: sparks can flee or freeze from harmful light, or charge toward light when rewarded for speed.
- The implementation uses a version of the REINFORCE algorithm with weight perturbation; each trial lasts 500 time steps and measures average brightness along the spark’s path.
#reinforcement learning #neuroscience #reinforce #evolution strategies
Generated by gpt-5.6-sol. Check the original for details.
Metric trends
Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained
Points
Score reported by the source.
- Hacker News: 166, latest observation ; +154 over observed period since
Comments
Comment count reported by the source.
- Hacker News: 9, latest observation ; +9 over observed period since
Aliases
| Source | External ID | URL |
|---|---|---|
| Hacker News | 50496885 | https://aatishb.com/myriad/how-brains-learn/ Read discussion |