h0 1.0.1rc0
H0
License: MIT
Requires Python: >=3.6.2
Keywords: H0 ml iva

# HZAI

[![Build Status](https://api.travis-ci.com/malkoch/H0.svg?token=zo7DTgcVysWxrnWTSbJw&branch=master)](https://api.travis-ci.com/malkoch/H0.svg?token=zo7DTgcVysWxrnWTSbJw&branch=master)
[![Documentation Status](https://readthedocs.org/projects/h0/badge/?version=latest)](https://h0.readthedocs.io/en/latest/?badge=latest)
[![License](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/malkoch/HZAI/blob/master/LICENSE)
[![Python package](https://github.com/malkoch/H0/actions/workflows/python-package.yml/badge.svg)](https://github.com/malkoch/H0/actions/workflows/python-package.yml)
[![Upload Python Package](https://github.com/malkoch/H0/actions/workflows/python-publish.yml/badge.svg)](https://github.com/malkoch/H0/actions/workflows/python-publish.yml)

## What is included?

As of today, the following algorithms have been implemented:

As of today, the following environments have been implemented:
- [ ] Rubick's Cube
- [ ] 2048 Puzzle
- [x] Sokoban
- [ ] Game of 15
- [x] Chess

As of today, the following networks have been implemented:
- [x] DQN [[1]](http://arxiv.org/abs/1312.5602)
- [x] DDPG [[2]](http://arxiv.org/abs/1509.02971)

You can find more information in the [doc](https://hzai.readthedocs.io/en/latest/).

## Installation

- Install HZAI from Pypi (recommended):

```
pip install hzai
```

Install from Github source:

```
git clone https://github.com/malkoch/HZAI.git
cd HZAI
python setup.py install
```

## Examples

If you want to run the examples, you'll also have to install:
- **gym** by OpenAI: [Installation instruction](https://github.com/openai/gym#installation)

Once you have installed everything, you can try out a simple example:

```bash
python examples/sokoban_dqn.py
python examples/sokoban_ddpg.py
```

## How to run the tests

To run the tests locally, you'll first have to install the following dependencies:

```bash
pip install pytest pytest-xdist pep8 pytest-pep8 pytest-cov python-coveralls
```

You can then run all tests using this command:

```bash
py.test tests/.
```

If you want to check if the files conform to the PEP8 style guidelines, run the following command:

```bash
py.test --pep8
```

If you want to check the code coverage, run the following command:

```bash
py.test --cov=H0 tests/
```

## References

1. Mnih, Volodymyr, et al. "Playing atari with deep reinforcement learning." *arXiv preprint arXiv:1312.5602* (2013).
2. Lillicrap, Timothy P., et al. "Continuous control with deep reinforcement learning." *arXiv preprint arXiv:1509.02971* (2015).
3. Fujimoto, Scott, Herke van Hoof, and David Meger. "Addressing function approximation error in actor-critic methods." *arXiv preprint arXiv:1802.09477* (2018).
4. Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton. "Imagenet classification with deep convolutional neural networks." *Advances in neural information processing systems.* 2012.
5. Goodfellow, Ian, et al. "Generative adversarial nets." *Advances in neural information processing systems.* 2014.
6. Mirza, Mehdi, and Simon Osindero. "Conditional generative adversarial nets." *arXiv preprint arXiv:1411.1784* (2014).
7. Karras, Tero, et al. "Progressive growing of gans for improved quality, stability, and variation." *arXiv preprint arXiv:1710.10196* (2017).
8. He, Kaiming, et al. "Deep residual learning for image recognition." *Proceedings of the IEEE conference on computer vision and pattern recognition.* 2016.
9. Ronneberger, Olaf, Philipp Fischer, and Thomas Brox. "U-net: Convolutional networks for biomedical image segmentation." *International Conference on Medical image computing and computer-assisted intervention.* Springer, Cham, 2015.
10. Simonyan, Karen, and Andrew Zisserman. "Very deep convolutional networks for large-scale image recognition." *arXiv preprint arXiv:1409.1556* (2014).