SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1712.01815 · 2017

Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm

arXiv · PDF · Open in the Atlas

Code that ran

13 of 17 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 9 failures of our instrument; 4 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1712.01815.json · badge: /api/ran/1712.01815.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
samhippie/q-game-agent reimplementation (classifier label)
classifier basis: classifier_2025
4 ran · 2 no recorded run
saikrishna-1996/deep_pepper_chess reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
MerceaOtniel/HybridAlpha extension (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
copy not recorded community
not in the paper's declared repositories
2 ran · 0 no recorded run
michaelnny/alpha_zero reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
AIRLegend/ChessRL reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
check_current_planes Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
saikrishna-1996/deep_pepper_chess/game/chess_env.py
pointer only (licence: NONE) · get_code("a58eda7e5b17cc79")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, saikrishna-1996/deep_pepper_chess when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

conv1x1 Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from MediaBrain-SJTU/BCL
pointer only · get_code("d9def42110729a85")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

conv3x3 Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from MediaBrain-SJTU/BCL
pointer only · get_code("160bb14bd76201b4")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_model_path Ran
ran; our contract draft was wrong, not the code
AIRLegend/ChessRL/src/chessrl/selfplay.py
pointer only (licence: NONE) · get_code("0a0e35f51eb67cba")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AIRLegend/ChessRL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_from_file Ran
ran; our contract draft was wrong, not the code
michaelnny/alpha_zero/alpha_zero/core/pipeline.py
code served (permissive licence) · get_code("b96683ba59bfac1b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pickle
import tempfile
import os

# Create a temporary file with pickled data
temp_file = tempfile.NamedTemporaryFile(mode='wb', delete=False, suffix='.pkl')
test_data = {"key": "value", "number": 42, "list": [1, 2, 3]}
pickle.dump(test_data, temp_file)
temp_file.close()

ARGS = {
    "file_name": temp_file.name
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
montecarloSearch Ran
ran; our contract draft was wrong, not the code
samhippie/q-game-agent/mcts.py
code served (permissive licence) · get_code("fd988c07ec074f4e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned defaultdict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import copy
import random
import math
import collections

class TicTacToeGame:
    def __init__(self):
        self.board = [0, 0, 0, 0, 0, 0, 0, 0, 0]  # 0 = empty, 1 = player 1, 2 = player 2
        self.turn = 1
    
    def getData(self):
        return self.board + [self.turn]
    
    def getActions(self):
        actions = []
        for i in range(9):
            if self.board[i] == 0:
                actions.append([i])
        if not actions:
            actions = [[0]]  # Dummy action if no moves available
        return actions
    
    def takeTurn(self, action):
        pos = action[0]
        if pos < len(self.board) and self.board[pos] == 0:
            self.board[pos] = self.turn
        
        # Check for winner
        win_patterns = [
            [0, 1, 2], [3, 4, 5], [6, 7, 8],  # rows
            [0, 3, 6], [1, 4, 7], [2, 5, 8],  # cols
            [0, 4, 8], [2, 4, 6]  # diagonals
        ]
        
        for pattern in win_patterns:
            if (self.board[pattern[0]] == self.board[pattern[1]] == 
                self.board[pattern[2]] != 0):
                return self.board[pattern[0]]  # Return winner
        
        # Check for draw
        if all(cell != 0 for cell in self.board):
            return -1  # Draw
        
        # Switch turn
        self.turn = 2 if self.turn == 1 else 1
        return None  # Game continues

game = TicTacToeGame()

probTable = collections.defaultdict(lambda: (0, 0))

ARGS = {
    'game': game,
    'limit': 10,
    'probTable': probTable
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
montecarloSearchImpl Ran
ran, violated the contract we drafted
samhippie/q-game-agent/mcts.py
code served (permissive licence) · get_code("e7b5cf984bf63ef1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import random
import math

class SimpleGame:
    def __init__(self):
        self.turn = 0
        self.state = [0, 1, 2, 3]
        self.move_count = 0
        self.max_moves = 3
    
    def getActions(self):
        # Return list of possible actions
        return [[0], [1], [2]]
    
    def getData(self):
        # Return current game state as a list
        return self.state
    
    def takeTurn(self, action):
        # Execute an action and return result (None while game ongoing, -1 for draw, or player number for win)
        self.move_count += 1
        self.turn = 1 - self.turn
        if self.move_count >= self.max_moves:
            return self.turn  # Return winning player
        return None

# Create a game instance
game = SimpleGame()

# Create a probability table with initial entries
# Keys are (player, state, action) tuples
# Values are (win_count, total_count) tuples
probTable = {}

# Populate probTable with entries for all possible game states and actions
# that might be encountered during the search
for player in [0, 1]:
    for state_val in range(4):
        state = (state_val, state_val + 1, state_val + 2, state_val + 3)
        for action in [[0], [1], [2]]:
            probKey = (player, state, tuple(action))
            probTable[probKey] = (0, 0)  # (wins, count)

ARGS = {
    "game": game,
    "probTable": probTable,
    "uct_c": 1.414
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
montecarloSearchNN Ran
ran; our contract draft was wrong, not the code
samhippie/q-game-agent/mcts.py
code served (permissive licence) · get_code("14c1d67b6668d671")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned coroutine. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import copy

torch.manual_seed(0)

class DummyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 8)
    
    def forward(self, x):
        return self.linear(x)

class DummyGame:
    def __init__(self):
        self.turn = 0
        self.num_actions = 6
        self._state = [0, 1, 2, 3]
        self._actions = [[0, 0], [1, 0], [0, 1], [1, 1], [2, 0], [2, 1]]
    
    def getActions(self):
        return self._actions
    
    def getData(self):
        return self._state
    
    def takeTurn(self, action):
        return None
    
    def enumAction(self, action):
        return self._actions.index(action)
    
    def actionToString(self, action):
        return str(action)
    
    def printBoard(self):
        print("Board state:", self._state)

class DummySearchState:
    def __init__(self):
        self.visits = {}
        self.q_values = {}
    
    def isLeaf(self, state):
        return state not in self.visits
    
    def Q(self, state, action):
        key = (state, action)
        return self.q_values.get(key, 0.0)
    
    async def U(self, state, action, actions):
        return 0.1
    
    def addVisit(self, state, action):
        key = (state, action)
        self.visits[key] = self.visits.get(key, 0) + 1
    
    async def addLeafVisit(self, state):
        self.visits[state] = self.visits.get(state, 0) + 1
    
    def N(self, state, action):
        key = (state, action)
        return self.visits.get(key, 0)
    
    async def V(self, state):
        return 0.5

model = DummyModel()
game = DummyGame()
searchState = DummySearchState()

ARGS = {
    "model": model,
    "game": game,
    "searchState": searchState,
    "limit": 5,
    "temperature": 1.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
playGame Ran
ran; our contract draft was wrong, not the code
samhippie/q-game-agent/agent.py
code served (permissive licence) · get_code("c7d6dbb8bf86e42e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Game. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import copy
import random

torch.manual_seed(0)

# Stand-in classes for State and Game
class State:
    def __init__(self, board_data, available_actions):
        self.board_data = board_data
        self.available_actions = available_actions
    
    def getActions(self):
        return self.available_actions
    
    def getData(self):
        return self.board_data
    
    def actionToString(self, action):
        return f"action_{action}"

class Game:
    def __init__(self):
        self.turn = 1
        self.board_state = [0, 1, 2, 3]
        self.move_count = 0
        self.max_moves = 3
    
    def printBoard(self):
        pass
    
    def takeTurn(self, action):
        self.move_count += 1
        self.turn = 3 - self.turn  # Toggle between 1 and 2
        if self.move_count >= self.max_moves:
            return 1  # Player 1 wins
        return None
    
    def getActions(self):
        return [[0.1, 0.2], [0.3, 0.4]]
    
    def getData(self):
        return [0.5, 0.6]

# Simple model that implements getValues
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def getValues(self, inputs):
        # inputs is a list of concatenated state+action vectors
        tensor_inputs = torch.tensor(inputs, dtype=torch.float32)
        values = self.linear(tensor_inputs)
        return values.squeeze(-1).tolist()

# Create instances
game = Game()
model1 = SimpleModel()
model2 = SimpleModel()
modelTuples1 = []
modelTuples2 = []

ARGS = {
    'game': game,
    'model1': model1,
    'model2': model2,
    'modelTuples1': modelTuples1,
    'modelTuples2': modelTuples2,
    'verbose': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Game — a Game output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Game output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
round_it Ran
ran, honoured the contract we drafted
michaelnny/alpha_zero/alpha_zero/core/pipeline.py
code served (permissive licence) · get_code("9cc703fca50c5430")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

ARGS = {
    'v': 3.14159265359,
    'places': 4
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
startprocess Ran
ran; our contract draft was wrong, not the code
MerceaOtniel/HybridAlpha/Coach.py
pointer only (licence: NOASSERTION) · get_code("81a1ac33f0025d8d")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, MerceaOtniel/HybridAlpha (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

testeval Ran
ran, honoured the contract we drafted
saikrishna-1996/deep_pepper_chess/game/chess_env.py
pointer only (licence: NONE) · get_code("3ad61b90db37c4ac")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, saikrishna-1996/deep_pepper_chess when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

verifyqueue Ran
ran, honoured the contract we drafted
MerceaOtniel/HybridAlpha/Coach.py
pointer only (licence: NOASSERTION) · get_code("d3c9c9ec652d6321")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, MerceaOtniel/HybridAlpha (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

canon_input_planes Not yet run
unverified (harvested, no recorded run)
saikrishna-1996/deep_pepper_chess/game/chess_env.py
pointer only (licence: NONE) · get_code("d2b40d873baa4080")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, saikrishna-1996/deep_pepper_chess when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

playWithUser Not yet run
unverified (harvested, no recorded run)
samhippie/q-game-agent/agent.py
code served (permissive licence) · get_code("2ec43855e786d958")
How it ran

no invocation recorded.

testAgainstRandom Not yet run
unverified (harvested, no recorded run)
samhippie/q-game-agent/agent.py
code served (permissive licence) · get_code("9b036e9b6735a5a6")
How it ran

no invocation recorded.

verifyvalues Not yet run
unverified (harvested, no recorded run)
MerceaOtniel/HybridAlpha/Coach.py
pointer only (licence: NOASSERTION) · get_code("8d30022fe6a8a4ed")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, MerceaOtniel/HybridAlpha (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 15 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
conv1x1 431 other papers
12 dated earlier, 418 later, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
conv3x3 312 other papers
4 dated earlier, 307 later, 1 undated · 31 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
and 309 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

More are linked than shown here.

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The game of chess is the most widely-studied domain in the history of artificial intelligence. The strongest programs are based on a combination of sophisticated search techniques, domain-specific adaptations, and handcrafted evaluation functions that have been refined by human experts over several decades. In contrast, the AlphaGo Zero program recently achieved superhuman performance in the game of Go, by tabula rasa reinforcement learning from games of self-play. In this paper, we generalise this approach into a single AlphaZero algorithm that can achieve, tabula rasa, superhuman performance in many challenging domains. Starting from random play, and given no domain knowledge except the game rules, AlphaZero achieved within 24 hours a superhuman level of play in the games of chess and shogi (Japanese chess) as well as Go, and convincingly defeated a world-champion program in each case.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1712.01815")
get_code_for_paper("1712.01815")
have("1712.01815")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1712.01815.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1712.01815.svg)](https://syntology.ai/paper/1712.01815)

Connect an agent — have() is free.