| .cargo | ||
| best-individuals | ||
| rennuos@880778a398 | ||
| src | ||
| .gitignore | ||
| .gitmodules | ||
| best-96.json | ||
| best-1369.json | ||
| best-1900.json | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.lock | ||
| flake.nix | ||
| index.html | ||
| init.sav | ||
| mario.nes | ||
| readme.md | ||
| rust-toolchain.toml | ||
maroil-webviewer
maroil uses rennuos NEAT library to play Super Mario Bros on an emulated NES. You can find more information about rennuos and maroil global implementation on my blog. This project is a web viewer to evaluate a neural network playing to the NES, using web assembly.
How to build the project
To build the project, you will need rust-wasm-bindgen and the dependencies specified in Cargo.toml. If you use NixOS with flakes, you can simply use nix develop to get the dependencies :
$ nix develop
$ wasm-pack build --target web
How to run the project
If you want to run the project, you can run a simple HTTP server (e.g. from python). This HTTP server is only used to allow the wasm program to perform XHR in order to get the required files (weights, ram state, rom).
$ python3 -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
# maroil-webviewer will be accessible from http://localhost:8000
You'll find in the best-individuals directory the result of 1600 generations of neuroevolution. Each json file corresponds to the weights of the best individual in the generation i.
This project was written without the help of AI.
enjoy!