hello i'm trying to do a IA for a game named "push over". I'm new in IA coding so i dont understand a lot of thing i do. The game looks like these (random game position).
XOXX
OOXX
XXXO
XOOO
there is 2 players, X and O, and you game push one piece of yours from every side but it will change the line or column. If i'm O and i put one in the second column, it'll looks like this :
XOXX
OOXX
XOXO
XXOO
here is my code :
import tensorflow as tf
model = tf.keras.models.Sequential()
model.add(tf.keras.layers.Dense(17, activation="relu"))
model.add(tf.keras.layers.Dense(289, activation="relu"))
model.add(tf.keras.layers.Dense(2, activation="softmax"))model.compile(loss="sparse_categorical_crossentropy",
optimizer="sgd",
metrics=["accuracy"])model.fit(entree, target, epochs=1)
entree and target are the databases i did for the IA. It is some position of the game, the player who played and if the position is winning or not (not optimal but enought to get started). It looks like something like this : entree = [["X", "O", "X", "O", "O", "O", "X", "X", "O", "X", "X", "O", "O", "O", "X", "X", "X"], ...], target = ["W", "L", "L", "W", ...].
It returns a lot of things that i dont understand so if someone could help me, it would be nice