/chess-env-ai

This is the Gym environment from OpenAI for AI training

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Chess Environment

This is the Gym environment from OpenAI for AI training.

Watch the video

Requirements

Install

Steps to install the chess environment package:

  1. $ git clone https://github.com/Dmytro27Ind/chess-env-ai.git

  2. $ cd chess-env-ai

  3. $ pip install -e .

Example of using a chess environment

import  gym
import  gym_chess

if  __name__  ==  "__main__":
	env  =  gym.make('chess-v0')

	for  i_episode  in  range(5):
		observation  =  env.reset ()
		done  =  False

		while  not  done:
			env.render()
			observation , reward , done , info  = \
			env.step(env. action_space .sample ())

			if  done:
				env.render()
				break

	env.close ()