GitXplorerGitXplorer
b

cartpole

public
1 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
01c507e13fc4098d7b4a3f4af27ec034c13b7ba6

Updated Generation class.

bbdura committed 7 years ago
Unverified
e11a7ed928cff13d314308a8d847a6bb2307d424

Updated Agent class, began working on Generation.

bbdura committed 7 years ago
Unverified
25d1d1857f8f5c74a7264ff25c0f9975b510845d

First commit.

bbdura committed 7 years ago

README

The README file for this repository.

CartPole

A simple project to try out some learning strategies on Open AI Gym's CartPole-v0 environment :

  • a solution based on genetic algorithm;
  • a k nearest-neighbors strategy.

Genetic Algorithm

The idea is simplistic: make a fixed-sized population of agents compete. At every generation, survivors are selected stochastically according to their fitness (in this case their overall reward), and mutate into the next generation.

An Agent receives information about its environment (the observation variable returned by the step() method of the environment), and makes a decision on the action to take.

In our case, and Agent's brain consists of a simple two-layer neural network, which is fed the observation output by the environment at the end of each step. The genetic algorithm aims at determining the best parameters for the neural network.

k-Nearest Neighbors