Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Super ko #21

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Super ko #21

wants to merge 18 commits into from

Conversation

RohanM
Copy link

@RohanM RohanM commented May 3, 2022

This PR is based on the following, which should be reviewed and merged first:

Initial discussion: #13

Implements positional super ko rule, which prevents a board position from being repeated, beyond simple take-back scenarios. This rule is particularly useful for small boards, where it's easy to create multi-step cycles.

The rule is disabled by default, since a) we don't want to change the default behaviour of the gym, and b) it significantly affects performance:

❯ python gym_go/tests/efficiency.py
100%|█████████████████████████████████████████████████████| 64/64 [00:00<00:00, 371.53it/s]
Lower bound: 0.003 AVG, 0.000 STD
100%|█████████████████████████████████████████████████████| 64/64 [00:00<00:00, 374.59it/s]
Lower bound (super ko): 0.003 AVG, 0.000 STD
100%|██████████████████████████████████████████████████████| 64/64 [00:01<00:00, 53.18it/s]
Ordered Trajs: 0.019 AVG, 0.000 STD
100%|██████████████████████████████████████████████████████| 64/64 [00:31<00:00,  2.03it/s]
Ordered Trajs (super ko): 0.493 AVG, 0.006 STD
100%|██████████████████████████████████████████████████████| 64/64 [00:32<00:00,  1.96it/s]
Rand Trajs w/ Children: 0.510 AVG SEC, 0.029 STD SEC, 161.0 AVG STEPS
100%|██████████████████████████████████████████████████████| 64/64 [01:10<00:00,  1.11s/it]
Rand Trajs w/ Children (super ko): 1.107 AVG SEC, 0.082 STD SEC, 161.0 AVG STEPS
.
----------------------------------------------------------------------
Ran 6 tests in 136.795s

@RohanM RohanM marked this pull request as ready for review May 3, 2022 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant