Python Chess Algorithm

Publicado el: 02 marzo 2019
en el canal de: Knowledge Mavens
1,462
4

Michael Wild's Github https://github.com/alohawild/pythonchess
Slides
https://www.slideshare.net/KnowledgeM...

Chess Library
I am using the chess library that is supported from Python.

newchess.py
The newchess.py uses random selection over legal moves. Because of this it gets "smarter" as the number of pieces shrink. It handles check well as the legal moves limits its choices. It plays a very odd game with it seemly resisting you but seldom taking your pieces.

betterchess.py
The betterchess.py measures the value of moves by various factors and creates a value for a move. It picks the "best" move it in the list. The code looks forward about one move to check its settings. It also tries to cost not moving a piece. There is no exchange tree logic. Just looking at the board and playing various moves one step ahead. The first move is always random. This simulates an opening book, poorly but still better than always playing the same.

goodvalues.xml
This file is used to hold the factors used to run the program. It reads it and writes it out each run. At this time it makes not changes to the values.

Join our mailing list at
http://knowledgemavens.org
Check us out on Social Media at
  / knowledgemavens  
  / knowledge_mavens  
https://www.meetup.com/KnowledgeMavens/
https://github.com/knowledgemavens


En esta página del sitio puede ver el video en línea Python Chess Algorithm de Duración hora minuto segunda en buena calidad , que subió el usuario Knowledge Mavens 02 marzo 2019, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 1,462 veces y le gustó 4 a los espectadores. Disfruta viendo!