Py chess learning-module

12

Click here to load reader

description

rcos education

Transcript of Py chess learning-module

Page 1: Py chess learning-module

PyChess-Learning-Module

By: Jonathan Skurka

Page 2: Py chess learning-module

Recap: What is PyChess?

PyChess is a gtk chess client.PyChess is 100% python code, from the top of the UI to the bottom of the chess engine.All code is licensed under the GNU General Public License.PyChess was created to provide an advanced chess client for linux.The client is usable both to those new to chess, as well as those who want to use the computer to further enhance their play.

Page 3: Py chess learning-module

Features

Play against lots of chess engines in both CECP and UCI formats on many different difficulties.Supports online play on the FICS servers.Games can be saved in the PGN, EPD and FEN chess fileformats for later continuation or analysis.You can undo or pause the game at any time.Offers an opening book and so called hint- and spy- arrows, which shows you what the computer would do in your place, and what it would do if you opponent could move just now.PyChess offers a rich while simple interface, with sound, animation and Human Interface.

Page 4: Py chess learning-module

Pychess + Hint Mode

Page 5: Py chess learning-module

The Learning Center

My goal is to add a widget to PyChess which will allow people of all ages to learn how to play chess and enhance their skills.

Chess tutorThis will show newcomers how the pieces move and will teach them the basic rules of the game.This will also teach more advanced moves such as castling, en passent, and forking and pinning pieces

Common endgamesThis will teach beginners how to win common endgame situations such as Rook and King vs King

Puzzle databaseContains a multitude of harder puzzles where a deciding non-obvious move will win you the game.

Page 6: Py chess learning-module

The Learning Center

More advanced featuresIn-depth Game analysisInteractive teaching as you play the computer

Page 7: Py chess learning-module

Major Roadblocks

The current structure of PyChess has to major problems:It is hard to add new UI modulesThreads are everywhere!

The first problem is a thread to the consistent UI. New windows will open in a way, which makes it hard to say closing which windows will terminate the app.This also makes it very difficult to get a good grip at plug-ins.The second problem has been around since the start of PyChess, and has grown more problematic with each release. About 90% of all PyChess crashes (which often are also system crashes) are due to this.

Page 8: Py chess learning-module

The Solution

PyChess needs to be refactored into a more modular structure. A structure that makes it clear where to add UI modules and where to lock threads.There is currently a proposal to change the structure of PyChess:

Page 9: Py chess learning-module
Page 10: Py chess learning-module

Other Problems and setbacks

Not only does PyChess have very confusing code and flow, it is also very poorly commented and documented.

This made it extremely difficult to grasp where to start.Learning the existing code was also very time-consuming.

No prior experience with PyGtk.went from a group of 3 to 1.

Page 11: Py chess learning-module

Progress so far...

Starting to make steady progress:Currently working on the UI for the learning center I am also implementing the puzzle database, which should be finished relatively soon.

Page 12: Py chess learning-module

Future plans for PyChess

Because PyChess is so poorly formated (e.g.many threads leading to nowhere) I am unsure if I will continue to develop the Learning-Module -at least until a newer, more stable version is released.At the very least I want to finish the UI for the learning center and implement the puzzle database.