Let the competition begin!

Nah, just kidding. tsdgeos fixed some bugs in KSquares today with minor assistance from me. He already posted about how to massively increase the speed of the drawing (first remove the QGraphicsItem before deleting it) and after that we got to work on the AI.

The AI was causing major leg when deciding which square to fill when there were no save moves left. on a 50×30 grid it would walk through a for loop 2.250.000 times per move. There were some improvements made with memory managing this and now it runs pretty smoothly, it still needs some time to think of which  square to fill, but making a chain after that is lighning fast.

I needed to show this obviously, so I rendered a screencast with 4 AI players on a 50*30 grid. (I increased the max AI moves to 25 moves/s, there is a timer to not make it instantaneous, normally the maximum speed is 8 moves/s).

The next step is getting all the GGZ stuff to work everywhere and host a global KSquares tournament ;-)

Edit: video does not show on Planet KDE, it can be found: Here

Leave a Reply