[Kde-games-devel] Some info about KsirK and its AI

Gaël (aka Kleag) kleag at free.fr
Wed Mar 31 22:44:22 CEST 2010


Hello,

I send this to kde-games-devel and to all students that have postulated up to 
now (I hope I don't forget anyone) to give some of the information asked by 
some of you about the ksirk architecture and its AI.

So, KsirK uses libkdegames/kgame, so its AI players (base class: AIPlayer) are 
implementations of the kgame Player class. They use the AIPlayerIO class 
(inherited from KGameIO) to interact with the game.

AIPlayer contains a pointer to the main game object (GameAutomaton) in order 
to be able to look at the game state (country owners, etc.). It has its own 
thread that regularly calls actionChoice that will use various game data to 
chose what actions to be done, using for example 
chooseAttackMoveArmiesOrNextPlayer or chooseInvasionAction.

The currently used AI is AIColsonPlayer (from XFrisk by Jean-CLaude Colson). 
It reimplements some virtual methods from AIPlayer, like 
chooseAttackMoveArmiesOrNextPlayer.

So, the current architecture is too much monolithic. AIs should probably be 
some kind of plugins, so that the game could be configured easily to use one or 
another, or even various AIs for the different computer players. Also, current 
AIs, the original one randomly choosing its action and the Colson's one are 
too much ad hoc. The KsirK AI should use more formal and well defined 
algorithms. The new features of the AI (difficulty level, main strategy,...) 
should be configurable by UI either by settings or at game start. Finally, the 
AI should be able to take into account the goals (this is not the case 
currently) and the cards distribution (which is not implemented currently).

So, there is much work to do and I really hope that one of you will be 
selected to work on it during KsirK !

Good luck !

Gaël


-- 
KsirK - a world domination strategy game 
http://techbase.kde.org/Projects/Games/Tactic_and_Strategy/KsirK

KGraphViewer - a GraphViz dot graphs viewer and editor based on a reusable 
part
http://extragear.kde.org/apps/kgraphviewer


More information about the kde-games-devel mailing list