Skip to content

Instantly share code, notes, and snippets.

View ttschnz's full-sized avatar
🐢
hardly working

tim ttschnz

🐢
hardly working
View GitHub Profile
@ttschnz
ttschnz / TicTacToeEnforcedLearning.py
Created July 5, 2021 13:55
Implementation of Enforced Learning algorithm for Learning Tic-Tac-Toe
import numpy as np
# import matplotlib.pyplot as plt
import pickle, time
class GameField:
playerSymbols = {-1:"x",1:"o", 0:"□"}
beginningPlayer = -1
def __init__(self, players, boardSize, **kwargs):
self.useLog = kwargs["useLog"] if "useLog" in kwargs else False