The Seoul AI Gym: Seoul AI Gym is a toolkit for developing AI algorithms.
Project description
Seoul AI Gym
Seoul AI Gym is a toolkit for developing AI algorithms.
This gym
simulates environments and enables you to apply any teaching technique on agent.
Seoul AI Gym was inspired by OpenAI gym and tries to follow its API very closely.
Contents
Basics
There are two terms that are important to understand: Environment and Agent.
An environment is a world (simulation) with which an agent can interact. An agent can observe a world and act based on its decision.
seoulai-gym
provides environments.
An example of creating environment:
import seoulai_gym as gym
env = gym.make("Checkers")
Every environment has three important methods: reset
, step
and render
.
reset(self) -> observation
Reset an environment to default state and return observation
of default state.
observation
data structure depends on environment and is described separately for each environment.
step(self, action) -> observation, reward, done, info
Perform an action
in environment lastly observed by either reset
or step
.
An action
can differ among different environments but the return value of step
method is always same.
A reward
is given to an agent when action that was done in the current step or some of the previous steps have led to a positive outcome for an agent (e.g winning a game).
An info
is a dictionary containing extra information about performed action
.
render(self) -> None
Display state of game on a screen.
Installation
There are two ways to install seoulai-gym
.
pip
The recommended way for developers creating an agent is to install seoulai-gym
using pip
.
pip install seoulai-gym
From source
You can also clone and install seoulai-gym
from source.
This option is for developers that want to create new environments or modify existing ones.
git clone https://github.com/seoulai/gym.git
cd gym
pip install -e .
Supported systems
seoulai-gym
requires to have at least Python 3.6 and was tested on Arch Linux and macOS High Sierra.
Environments
Currently, one environment simulating game of Checkers is provided.
import seoulai_gym as gym
env = gym.make("Checkers")
env.reset()
env.render()
Examples
https://github.com/seoulai/gym/blob/master/examples/checkers_example.py
Testing
All test are written using pytest. You can run them via:
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for seoulai_gym-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1218897ebdcc2c8975af178e101966032d9a026b3c6dcde686a7d38f090313fa |
|
MD5 | e38a3be568378ff4b6e7369692394c7a |
|
BLAKE2b-256 | 9571745d312e18279c63a5fc753d508d6bb6ecfbc7ebfd6ec1b5771a2c4defcd |