3. http://aiclub.world
Architecture
My python code
makes the graphics
and the game
mechanics. My AI
predicts the move the
snake should make.
def
get_prediction(data={"foodx":100,"foody":60,"snakeheadx":0,"s
nakeheady":120}):
url =
'https://es31fyzms9.execute-api.us-east-1.amazonaws.com/Pre
dict/03a06c66-ef85-4040-810e-7812a23e1318'
r = requests.post(url, data=json.dumps(data))
response = getattr(r,'_content').decode("utf-8")
response=json.loads(json.loads(response)['body'])['predicted_la
bel']
print(response)
return response
This code interacts with the AI and gets
the prediction from aiclub.world.
5. http://aiclub.world
How did you train your AI?
I got my data by
printing values on
my shell and copy
and pasting it to
my sheets.
6. http://aiclub.world
What would you like to do next?
I would like to make
my app better by
adding much more
data and also
making the grid to a
30x30.