easyAI icon indicating copy to clipboard operation
easyAI copied to clipboard

A proposal for two-teams game

Open laxertu opened this issue 5 years ago • 3 comments

Hi all,

I'm working on a kind of RPG games framework based on easyAI, here: https://github.com/laxertu/rpg-engine

so I've adapted TwoPlayersGame class to suit with my requirements. Here is the result :-)

maybe you're interested in include something like that in your repo. As I'm a totally newbie in AI, any suggestion woud be really apreciated

thanks a lot

laxertu avatar Jan 13 '19 13:01 laxertu

I've only done a cursory view. Probably the first step is documentation. What does TwoTeamsGame do? You might want to include a simple example in the documentation. You could use the same example in the testing code. @Zulko what do you think?

JohnAD avatar Jan 14 '19 15:01 JohnAD

Hi John, thank you so much for your feedback

ok, I'll include some .rst doc file in my repo.

The idea is to override TwoPlayersGame switch_player method in order to allow games between two teams, default implementation is described here: https://github.com/laxertu/easyAI/blob/470961648d146ef94b375abdd4c71ea32dc6e09c/easyAI/TwoTeamsGame.py#L111

I really don't know if it may be useful for your project :-) but just in case..

laxertu avatar Jan 14 '19 18:01 laxertu

It's a novel use of the Negamax algorithm. As long as the next player is always predictable from the game state, I would think it would always work.

The challenge is what to use as a simple example. It needs to be simple enough to follow easily in code; yet not so simple that it doesn't demonstrate it's usefulness.

BTW, let me know if you have trouble with compiling the doc directory documentation. ... looking at my notes ... it uses the sphinx toolset. Hints are in the Makefile. I'm not normally a user of sphinx, so I had quite a bit of struggle with it. The compiled html is saved in the repo and is what http://zulko.github.io/easyAI/ uses.

JohnAD avatar Jan 20 '19 18:01 JohnAD