[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-games-devel
Subject:    [Kde-games-devel] AI library in the gamelibs?
From:       Inge Wallin <inge () lysator ! liu ! se>
Date:       2014-01-03 21:29:42
Message-ID: 1579790.cEf0u2BeaU () linux-da92 ! site
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


More than 10 years ago I used to work a lot on board game AI engines. I have a 
pretty advanced set of search and evaluation code for games like othello, 
Lines of Action, and Amazons that actually competed in the computer olympiad a 
couple of years.

I thought it would be a pity if this code got lost and I am working now to 
port it all to C++ and Qt and to begin with create a KDE program that plays 
Amazons[1][2]. If this game will ever be part of the KDE games is a question 
for later but while I am porting the AI to C++, 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

So, what's your opinion? You could argue that an advanced AI library like this 
would be unnecessary for the simple types of game that we have in the kde 
games, but I have one argument against that: efficiency is not wasted even if 
you don't make full use of it. You can also use it to save batteries which is 
very important on tablets and phones.  And I do think we should port as many 
of our games as possible to Plasma Active and other tablet operating systems.

Regarding use of it, if this is interesting I will personally port both 
KReversi and KFourinline to it but this is probably a half to one year into 
the future. Could also make a good Summer of Code project.

	-Inge

[1] https://en.wikipedia.org/wiki/Amazons_%28game%29
[2] http://quickgit.kde.org/?p=scratch%2Fingwa%2Famazons.git

[Attachment #5 (unknown)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" \
content="1" /><style type="text/css"> p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:11pt; \
font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">More than 10 years ago I used to work a lot on board game AI \
engines. I have a pretty advanced set of search and evaluation code for games like \
othello, Lines of Action, and Amazons that actually competed in the computer olympiad \
a couple of years.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">I thought it would be a pity if this code got lost and I am \
working now to port it all to C++ and Qt and to begin with create a KDE program that \
plays Amazons[1][2]. If this game will ever be part of the KDE games is a question \
for later but while I am porting the AI to C++, the question is if I should just use \
it or if I should make some preparatory work to include it in the games library.</p> \
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> \
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">It supports the following \
features, which none of the current or previous board games (like kenolaba), do:</p> \
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> - time control of the \
engine, not just depth of thinking</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"> - Iteratively deepening alpha-beta search algorithm with lots of \
optimizations</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> - Opening \
book generation and use of the opening books in the game</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> - 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</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">So, what's your opinion? You \
could argue that an advanced AI library like this would be unnecessary for the simple \
types of game that we have in the kde games, but I have one argument against that: \
efficiency is not wasted even if you don't make full use of it. You can also use it \
to save batteries which is very important on tablets and phones.  And I do think we \
should port as many of our games as possible to Plasma Active and other tablet \
operating systems.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">Regarding use of it, if this is interesting I will personally port \
both KReversi and KFourinline to it but this is probably a half to one year into the \
future. Could also make a good Summer of Code project.</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">	-Inge</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">[1] \
https://en.wikipedia.org/wiki/Amazons_%28game%29</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">[2] \
http://quickgit.kde.org/?p=scratch%2Fingwa%2Famazons.git</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p></body></html>



_______________________________________________
kde-games-devel mailing list
kde-games-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic