GeorgesCoding / Chess

Chess game with an AI engine developed using the PyGame module
MIT License
4 stars 0 forks source link

Model importation #5

Closed danielscos closed 5 months ago

danielscos commented 6 months ago

If I wanted to import a .h5 how would I import it?

GeorgesCoding commented 5 months ago

I'm not sure as I haven't worked with HDF5. What are you trying to use it for?

danielscos commented 5 months ago

Well, instead of using your ai I want to import a trained model. I want to train a chess neural network myself and then import it

GeorgesCoding commented 5 months ago

I'm quite busy with school right now so I won't be able to help too much. But to edit the AI, remove the part in Main.py that receives the returned value from the minimax function. Then, replace the variables that were supposed to be the returned values from the minimax function with the returned values of your own AI. You would have to convert your AI's decision into the various components of moving the piece: the old position of the piece being moved, the new position and the piece type. The positions should be in terms of the y,x coordinates of the board (from 0 to 7) and the piece type should follow the convention I used to represent pieces. Good luck!