snake-ai-pytorch
snake-ai-pytorch copied to clipboard
Model isn't loaded from file
Love what you've done with the python snake stuff, but i've noticed if you run the ai again, it doesn't use what it's already learnt and start from there again. Is there an easy way to get this implemented? I'm not great at python but i'd be happy to give it a go if i'm pointed in the right direction?
I had this same question, just commenting to see if an answer is ever provided
You can save what the AI has learned in a folder somewhere and reuse that contents when train() begins again.
I made a code entirely based on this repository. It includes this functionality. Maybe it helps: https://github.com/flaviolsousa/ping-pong-ia/blob/main/classes/model/model.py
I made a code entirely based on this repository. It includes this functionality. Maybe it helps: https://github.com/flaviolsousa/ping-pong-ia/blob/main/classes/model/model.py
I tried by loading state dict but still it performs poorly (starts learning from scratch everytime its ran)
I made a code entirely based on this repository. It includes this functionality. Maybe it helps: https://github.com/flaviolsousa/ping-pong-ia/blob/main/classes/model/model.py
I tried by loading state dict but still it performs poorly (starts learning from scratch everytime its ran)
you can delete "if random.randint(0, 200) < self.epsilon" in agent.py.