https://github.com/ianchanning/micrograd-js
Karpathy's micrograd in JS + Property Type tests
https://github.com/ianchanning/micrograd-js
ai autograd javascript micrograd property-based-testing
Last synced: 11 months ago
JSON representation
Karpathy's micrograd in JS + Property Type tests
- Host: GitHub
- URL: https://github.com/ianchanning/micrograd-js
- Owner: ianchanning
- License: mit
- Created: 2025-06-09T04:12:06.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-26T14:26:31.000Z (12 months ago)
- Last Synced: 2025-06-26T15:28:29.775Z (12 months ago)
- Topics: ai, autograd, javascript, micrograd, property-based-testing
- Language: JavaScript
- Homepage:
- Size: 45.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Micrograd in JavaScript
This is reimplementing Andrej Karpathy's [micrograd][2] in JavaScript. I'm sure its been done elsewhere, but I like the idea of implementing it.
> Implementing it myself from scratch was the most important
>
> — Andrej Karpathy talking to Andrew Ng (2018) [[1][1]]
## Install
```sh
npm install
npm test
```
Look at the `engine.test.js`. I've added property-based testing to show the power of including property-based testing with AI tools.
Since that we have the tests, we can abuse these to bring about a more Scheme like code base. An experiment with Gemini pro as the architect and Gemini flash as the coder locally in Aider.
Its mostly generated by AI, except for (the WIP) `engine-experiment.js` which is me following along with his video.
[1]: https://www.youtube.com/watch?v=_au3yw46lcg
[2]: https://www.youtube.com/watch?v=VMj-3S1tku0