Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model isn't loaded from file #8

Open
JS-E opened this issue Jun 12, 2022 · 5 comments
Open

Model isn't loaded from file #8

JS-E opened this issue Jun 12, 2022 · 5 comments

Comments

@JS-E
Copy link

JS-E commented Jun 12, 2022

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?

@joeyadelman
Copy link

joeyadelman commented Jul 13, 2022

I had this same question, just commenting to see if an answer is ever provided

@Vansh404
Copy link

You can save what the AI has learned in a folder somewhere and reuse that contents when train() begins again.

@flaviolsousa
Copy link

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

@Dev-Mehta
Copy link

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)

@Zrsion
Copy link

Zrsion commented Apr 24, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants