3d-connectX-env
3D connectX repository, developed for the OpenAI Gym format.
Installation
The preferred installation of 3d-connectX-env is from pip:
pip install 3d-connectX-env
Usage
Python
import gym_3d_connectX
import gym
env = gym.make('3d-connectX-v0')
env.reset()
env.utils.win_reward = 100
env.utils.draw_penalty = 50
env.utils.lose_penalty = 100
env.utils.could_locate_reward = 10
env.utils.couldnt_locate_penalty = 10
env.utils.time_penalty = 1
env.player = 1
actions = [0, 0, 1, 1, 2, 2, 4, 4, 0, 0, 1, 1, 2, 2, 0, 3]
for action in actions:
obs, reward, done, info = env.step(action)
env.render(mode="plot")
Environments
The environments only send reward-able game-play frames to agents; No cut-scenes, loading screens, etc. are sent to an agent nor can an agent perform actions during these instances.
Environment: 3d-connectX-v0
Factor at initialization.
| Key | Type | Description |
|---|---|---|
num_grid |
int |
Length of a side. |
num_win_seq |
int |
The number of sequence necessary for winning. |
win_reward |
float |
The reward agent gets when win the game. |
draw_penalty |
float |
The penalty agent gets when it draw the game. |
lose_penalty |
float |
The penalty agent gets when it lose the game. |
couldnt_locate_penalty |
float |
The penalty agent gets when it choose the location where the stone cannot be placed. |
could_locate_reward |
float |
The additional reward for agent being able to put the stone. |
time_penalty |
float |
The penalty agents gets along with timesteps. |
first_player |
int |
Define which is the first player. |
Step
Info about the rewards and info returned by the step method.
| Key | Type | Description |
|---|---|---|
turn |
int |
The number of the player at this step |
winner |
int |
Value of the player on the winning side |
is_couldnt_locate |
bool |
In this step the player chooses where to place the stone. |
Metadata
Release files for 3d-connectX-env 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| 3d-connectX-env-1.0.1.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 3d_connectX_env-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.3 kB
Release files / 3d-connectX-env-1.0.1.tar.gz
| Download URL | 3d-connectX-env-1.0.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4cb2e2425582a20a37fbeadabf642ffd77d0cff11a2f2ec0acf7823a697f5ba
|
|
BLAKE2b-256 checksum How to use checksums |
593ab61a025127c655513ced4d1bf4c9cf8a372d3ec2e0537474a03b272d1757
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
|
Release files / 3d_connectX_env-1.0.1-py3-none-any.whl
| Download URL | 3d_connectX_env-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4d81499fd418b85a62d4c6aa31f270c4821922a0d96a9cb8ee61d8fbb9b9649
|
|
BLAKE2b-256 checksum How to use checksums |
334f62cf3e931e7cbd99962ecd5b9abd17203461f5a39956a587446f145184c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
|