Latest Posts

Topic: News about AI

Tibor

Topic Opener
Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2016-10-19, 18:48

einstein13 wrote:

For example we can provide part of widelands server to download "latest version" of AI and upload game results (if the player accept that!) but there should be a mechanism that will pick best factors. There is no easy solution for that (I can't see it now). But practising the AI will be much faster...

You are right it is difficult to evaluate such diverse games. Also number of games played on the server daily is probably quite low. I am able to run about 20-30 games daily on my PC (4 games in parallel!)

If somebody is curious, I use these maps for testing

  • Crater
  • Four mountains
  • Maze
  • Crabsome island

Some maps test ability to expand (without fighting) and some fighting.... The code contains four DNAs - winners from each map from a round - basically one winner daily per map / 4 winners in total.

Edited: 2016-10-19, 18:49

Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2016-10-19, 18:51

DragonAtma wrote:

As for "fitness" that presumably comes down to "which AI wins the game?".

Well usual approach for such testing is like 500 individuals and 10 best fitting are cloned for next generation. But this is obviously not possible with widelands (on one map)


Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2016-10-19, 18:53

DragonAtma wrote:

I'm sure the testing will be AIs only.

I do have a question, though: which game type(s) will you be using? An AI that does well in Wood Gnome may fare poorly in Endless Game, and one with revealed map may not do so well with fog of war.

AI still does not distinguish these modes.


Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2016-10-19, 18:56

GunChleoc wrote:

I have created a branch that allows 16 players, with repeating player colors:

https://code.launchpad.net/~widelands-dev/widelands/max_players

The engine can handle up to 31 players, but there isn't enough UI space to set them all up as AIs. If you only start from command line, you could add more though.

This is nice. I have my testing environment settled now, but I think I will use it later. Thanks for effort...


Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2016-10-19, 19:02

And sometimes AI is completely screwed:



Not all genes are equal and change of some of them can have very bad effects. But the plan is very low mutation for "normal" AI so to avoid such irregularities as much as possible. It is far from "trained" yet


Top Quote
DragonAtma
Avatar
Joined: 2014-09-14, 00:54
Posts: 351
Ranking
Tribe Member
Posted at: 2016-10-20, 02:03

GunChleoc wrote:

I have created a branch that allows 16 players, with repeating player colors:

https://code.launchpad.net/~widelands-dev/widelands/max_players

The engine can handle up to 31 players, but there isn't enough UI space to set them all up as AIs. If you only start from command line, you could add more though.

Mmmm... now I'm tempted to try a 1-on-15. face-wink.png


Top Quote
DragonAtma
Avatar
Joined: 2014-09-14, 00:54
Posts: 351
Ranking
Tribe Member
Posted at: 2016-10-20, 04:26

Okay, question: what are the current player color palettes? I have some experience with that sort of thing, so I may be able to whip up eight more suitable colors for forces 9-16.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-10-20, 07:28

Player colors are defined in src/logic/player.cc:

const RGBColor Player::Colors[MAX_PLAYERS] = {
   RGBColor(2, 2, 198),      // blue
   RGBColor(255, 41, 0),     // red
   RGBColor(255, 232, 0),    // yellow
   RGBColor(59, 223, 3),     // green
   RGBColor(57, 57, 57),     // black/dark gray
   RGBColor(255, 172, 0),    // orange
   RGBColor(215, 0, 218),    // purple
   RGBColor(255, 255, 255),  // white
};

The icons are located in data/images/players.

I'll try to dig up original models in the media repository.

ETA: No luck, so the existing images will need to be colorized by hand.

Edited: 2016-10-20, 08:47

Busy indexing nil values

Top Quote
DragonAtma
Avatar
Joined: 2014-09-14, 00:54
Posts: 351
Ranking
Tribe Member
Posted at: 2016-10-20, 12:56

Aha! I have an older version, so that's why I couldn't find them. That said, try using the following colors for players 9-16:

RGBColor(0, 120, 255), // sky blue
RGBColor(104, 0, 40), // dark red
RGBColor(120, 108, 0), // dark yellow
RGBColor(0, 112, 0), // dark green
RGBColor(255, 120, 160), // rose
RGBColor(148, 56, 0), // brown
RGBColor(96, 0, 84), // dark purple
RGBColor(144, 144, 144), // light gray


...on a random note, at the bottom of the screenshots page, "a firy tournament" should read "a fiery tournament".

Edited: 2016-10-20, 12:58

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-10-20, 15:36

Thanks face-smile.png


Busy indexing nil values

Top Quote