In [1]:
import os
import matplotlib.pyplot as plt
import numpy
import tensorflow as tf
from Game import queen_data

In [2]:
from train_model import *
precision = get_precision()
# Plot First Player
plt.plot(get_game_data(True, 0, precision))
plt.plot(get_game_data(True, 1, precision))
plt.plot(get_game_data(True, 2, precision))
plt.text(0.8*precision, 0.35, r'$P(Q)=\frac{1}{3}$')
plt.text(0.8*precision, 0.55, r'$P(K)=\frac{1}{2}$')
plt.text(0.8*precision, 0.95, r'$P(A)=1$')
plt.title('First Player')
plt.savefig('image/firstplayer')
plt.close()
# Plot Second Player
plt.plot(get_game_data(False, 0, precision))
plt.plot(get_game_data(False, 1, precision))
plt.plot(get_game_data(False, 2, precision))
plt.text(0.8*precision, 0.05, r'$P(Q)=0$')
plt.text(0.8*precision, 0.30, r'$P(K)=\frac{1}{4}$')
plt.text(0.8*precision, 0.95, r'$P(A)=1$')
plt.title('Second Player')
plt.savefig('image/secondplayer')
plt.close()


Please enter the precision: 500

In [3]:
from IPython.display import Image
from IPython.display import display
x = Image(filename='image/firstplayer.png')
y = Image(filename='image/secondplayer.png')
display(x, y)



In [6]:
from self_train import *

# precision = get_precision()
val = get_self_data(precision)
plt.plot(val['Q'])
plt.plot(val['K'])
plt.text(0.8*precision, 0.35, r'Q bluff')
plt.text(0.8*precision, 0.27, r'K call')
plt.savefig('image/selftraining')
plt.close()
z = Image(filename='image/selftraining.png')
display(z)