Flyoff is a project that uses Rust and WebAssembly (WASM) to train virtual birds to get the most food using a genetic algorithm and a custom neural network.
- Node.js and npm
- Clone the repository:
git clone https://github.com/ipriyam26/Flyoff.git
- Navigate to the project directory:
- Build the project:
- Link the project:
- Install the npm dependencies:
- Start the development server:
npm run start
http://localhost:8080/in your browser to view the simulation.
- The birds will start to gather food using the Neural Network and Genetic Algorithm
The project uses a custom neural network architecture, which can be found in the
src/nn directory. The network takes in the bird's current x and y position, as well as the positions of nearby food, and outputs a prediction for the bird's next move.
The project uses a genetic algorithm to train the neural network. Each bird has a set of weights for its neural network, and these weights are evolved over time by selecting the birds with the highest food gathering efficiency to breed and pass on their weights to the next generation.
You can change the parameters of the simulation and the Neural Network by modifying the
If you're interested in contributing to Flyoff, please feel free to open a pull request or an issue.
Flyoff is licensed under the MIT license. See LICENSE for more information.