Skip to main content

Rolling Horizon Evolutionary Algorithm

Project description

# Rolling Horizon Evolutionary Algorithm

[![PyPI version](https://badge.fury.io/py/RollingHorizonEA.svg)](https://badge.fury.io/py/RollingHorizonEA)

An implementation of the [Rolling Horizon Evolutionary Algorithm](https://www.semanticscholar.org/paper/Rolling-horizon-evolution-versus-tree-search-for-in-Liebana-Samothrakis/0cff838805be4b6366756a553daca0036778c1e0)

## Installation

### using pip

```
pip install RollingHorizonEA
```

## Usage

To use the rolling horizon evolutionary algorithm, you will need your game class to implement the `Environment` interface.

### Examples

Examples of setting up any game environment can be found in the `examples` directory and run with:
```
python run.py
```

#### m_max example

```
num_dims = 600
m = 50
num_evals = 50
rollout_length = 10
mutation_probability = 0.1

# Set up the problem domain as m-max game
environment = MMaxGame(num_dims, m)

rhea = RollingHorizonEvolutionaryAlgorithm(rollout_length, environment, mutation_probability, num_evals)

rhea.run()
```


## Cite

If you want to cite this library, please use the following DOI

[![DOI](https://zenodo.org/badge/172040305.svg)](https://zenodo.org/badge/latestdoi/172040305)


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

RollingHorizonEA-0.0.2.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

RollingHorizonEA-0.0.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file RollingHorizonEA-0.0.2.tar.gz.

File metadata

  • Download URL: RollingHorizonEA-0.0.2.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/38.5.2 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.2

File hashes

Hashes for RollingHorizonEA-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f6d7b99c54008937f14977089bba2cf971f99fe4260d5a74dfcde2644a7cf734
MD5 b964c7e285d159ef212cddbada426e96
BLAKE2b-256 c8ca94832ef56e0381568ef787e241d04e78f9586044a462539493c27cd23be6

See more details on using hashes here.

File details

Details for the file RollingHorizonEA-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: RollingHorizonEA-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/38.5.2 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.2

File hashes

Hashes for RollingHorizonEA-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 06d7293a2c1b958a88f58554487ff01059d2f48726e8d1ed3e974265c00787f8
MD5 7852571e3e4ad72998249d2963999bdc
BLAKE2b-256 ca24cc0d418f919549d66cc2bf10bd04ed3d3df290b37597d25fc697a75dfa2e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page