[Kde-games-devel] AI library in the gamelibs?

Ian Wadham iandw.au at gmail.com
Mon Jan 27 00:10:59 UTC 2014


On 27/01/2014, at 12:16 AM, Inge Wallin wrote:

> On Saturday, January 04, 2014 20:01:49 Inge Wallin wrote:
> > On Saturday, January 04, 2014 00:49:56 Tom Vincent Peters wrote:
> > > Hi Inge,
> > > 
> > > On 01/03/2014 10:29 PM, Inge Wallin wrote:
> > > > [...]  the question
> > > > is if I should just use it or if I should make some preparatory work to
> > > > include it in the games library.
> > > > 
> > > > It supports the following features, which none of the current or
> > > > previous board games (like kenolaba), do:
> > > > 
> > > > - time control of the engine, not just depth of thinking
> > > > 
> > > > - Iteratively deepening alpha-beta search algorithm with lots of
> > > > optimizations
> > > > 
> > > > - Opening book generation and use of the opening books in the game
> > > > 
> > > > - Support for games with many different types of rule sets like loss vs
> > > > tie if no move is available, simple win/lose vs graded win/loss (like
> > > > chess and reversi, respectively), etc
> > > > [...]
> > > 
> > > It would be great if you could put your code in the games library. That
> > > way I can use it for the very hard AI level in ksquares. I'm very
> > > interested in the time control and iteratively deepening alpha-beta
> > > search algorithm parts because that's just what I need to write a
> > > ksquares AI that compares to dabble [1]. It would be nice to rely on
> > > existing code instead of creating something from scratch, especially
> > > because I only have very limited time.
> > 
> > Sounds like there is a consensus to do it, only question is exactly how,
> > then. As Albert suggested, perhaps the best way is a separate repo.
>  
> Ok, a short status report.  Things are progressing nicely[1] and I will soon have to start to use the library in a real application so that I can finalize the API.  If there is anybody who wants to have their game get an AI boost, let me know here and I will start working in a branch to work the new library into the AI in question.
>  
> There are still lots of things to do before the first release can be done.  I have identified a number of tasks and milestones in the TODO file, which should be pretty understandable.
>  
> One suggestion of a game would be KJumpingCube which Ian talked about in another part of this thread. Ian, what do you say?  Interested?

Yes, I am, but I am head-down backside-up in Palapeli ATM and have some
other non-KDE commitments to attend to. So maybe it would be best, for you,
to start with KReversi or KSquares.

> If not, I will probably continue by doing this to Kreversi. Remember, I will naturally work in a branch so no disruption will happen to the game in question.  Any other volunteers are encouraged to speak up now.
>   
> [1] http://quickgit.kde.org/?p=scratch%2Fingwa%2Flibkdeai.git

This looks great.

One thing I am not clear on. Maybe you can point me in the right direction.

How do I provide the move algorithm to the AI? And would it have to
conform to the AI's data model of the board and position (for reasons
of speed, if nothing else)? IOW, would I use Bitboard.h?

I could see, when using the lash-up you did (via private email) of
KJumpingCube and the AI's pure C library-code, that your move
algorithm was a lot faster than the released version of KJC, thus
allowing more trial moves and further look-ahead in the time available.

Also, why is Bitboard a template class? Why not just supply a size
parameter to the constructor?

All the best, Ian W.





More information about the kde-games-devel mailing list