Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Build error, Warning, Readme #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
# AutoRocket
# AutoRocket

This is a project that uses genetic algorithms to train rockets to reach a target.

# Installation

## Prerequisites

In order to compile this project you will need to:
- have [SFML](https://www.sfml-dev.org/index.php) installed on your system. If you don't know how to do it see [this link](https://www.sfml-dev.org/tutorials/2.5/#getting-started).
- have [CMake](https://cmake.org/) installed

## Compilation

Then you can clone this repository and run the following commands:

```bash
mkdir build
cd build
cmake ..
make
```

# Commands

|Command|Action|
|-------|------|
|`E`|Toggle full speed|
|`M`|Toggle manual control|
|`S`|Toggle show just one rocket|
|`N`|Toggle draw neural network|
|`D`|Toggle draw rockets|
|`F`|Toggle draw fitness|
2 changes: 2 additions & 0 deletions include/dna.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
#include <vector>
#include <iostream>
#include <bitset>
#include <cstring>
#include "number_generator.hpp"
#include "utils.hpp"


constexpr float MAX_RANGE = 10.0f;
Expand Down
4 changes: 2 additions & 2 deletions include/stadium.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ struct Stadium
to_target.y,
r.velocity.x * dt,
r.velocity.y * dt,
cos(r.angle),
sin(r.angle),
static_cast<float>(cos(r.angle)),
static_cast<float>(sin(r.angle)),
r.angular_velocity * dt
};
// The actual update
Expand Down