No description
Find a file
emilien.gabon@gmail.com 9ff89c3c98 [FIX] readme.md corrections
2026-02-14 12:17:30 +01:00
.cargo [FIX] add config files 2026-02-13 15:15:28 +01:00
best-individuals [SYNC] best-individuals/ 2026-02-14 12:08:25 +01:00
rennuos@880778a398 [INIT] Initialisation of the project 2026-02-11 15:40:12 +01:00
src [FEAT] add generation selector, emulator autostop 2026-02-14 12:07:51 +01:00
.gitignore [FIX] add config files 2026-02-13 15:15:28 +01:00
.gitmodules [INIT] Initialisation of the project 2026-02-11 15:40:12 +01:00
best-96.json [INIT] Initialisation of the project 2026-02-11 15:40:12 +01:00
best-1369.json [FEAT] stop the emulation loop when the neuralnet has finished the level 2026-02-13 15:14:01 +01:00
best-1900.json [FEAT] stop the emulation loop when the neuralnet has finished the level 2026-02-13 15:14:01 +01:00
Cargo.lock [INIT] Initialisation of the project 2026-02-11 15:40:12 +01:00
Cargo.toml [FEAT] add generation selector, emulator autostop 2026-02-14 12:07:51 +01:00
flake.lock [FEAT] add generation selector, emulator autostop 2026-02-14 12:07:51 +01:00
flake.nix [FEAT] add generation selector, emulator autostop 2026-02-14 12:07:51 +01:00
index.html [FEAT] add generation selector, emulator autostop 2026-02-14 12:07:51 +01:00
init.sav [INIT] Initialisation of the project 2026-02-11 15:40:12 +01:00
mario.nes [INIT] Initialisation of the project 2026-02-11 15:40:12 +01:00
readme.md [FIX] readme.md corrections 2026-02-14 12:17:30 +01:00
rust-toolchain.toml [INIT] Initialisation of the project 2026-02-11 15:40:12 +01:00

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!