[Kde-games-devel] Review Request 115535: Implement undoMove() for KJumpingCube

Ian Wadham iandw.au at gmail.com
Sat Feb 8 21:28:08 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115535/#review49297
-----------------------------------------------------------

Ship it!


Ship It!

- Ian Wadham


On Feb. 7, 2014, 11:45 a.m., Inge Wallin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115535/
> -----------------------------------------------------------
> 
> (Updated Feb. 7, 2014, 11:45 a.m.)
> 
> 
> Review request for KDE Games and Ian Wadham.
> 
> 
> Repository: kjumpingcube
> 
> 
> Description
> -------
> 
> This patch implements undoMove() for the AI.
> 
> The primary reason is that the current model [save position - move - assess - restore position] fits very badly with the [move - assess - undo move] that is used in the upcoming kde games AI library that was discussed on the mailing list. So this is a preparatory patch to start using that library, something that Ian said he was interested in.
> 
> As a bonus, this patch also speeds up the AI somewhat. I don't know exactly how much but the previously used save/restore cycle of a position was not very efficient. Among other thing it called new/delete at least twice *per move* in the minimax algorithm.  As a side note, it would be interesting if Ian has a simple way of finding out how much more efficient it is, but even without it I'm fairly certain that the saving is significant.
> 
> Btw, the save/restore position thing is still used in the main game, this patch only touches the innards of the AI.  But I have an upcoming patch for that too. Stay tuned.
> 
> 
> Diffs
> -----
> 
>   ai_box.h 01ce182 
>   ai_box.cpp e481881 
>   ai_main.cpp 9cee435 
>   game.cpp c8a7cb8 
> 
> Diff: https://git.reviewboard.kde.org/r/115535/diff/
> 
> 
> Testing
> -------
> 
> Tested several full games. I also had a bug at one point which prompted me to do extensive logging and analysis of the logs.
> 
> 
> Thanks,
> 
> Inge Wallin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20140208/8e0a6997/attachment-0001.html>


More information about the kde-games-devel mailing list