BotOfDoom 3.0

AI discussion, ideas, and SDK help.
User avatar
GregM
Luxer
Posts: 252
Joined: Wed Jun 01, 2005 4:33 pm

BotOfDoom 3.0

Post by GregM » Sun Jan 29, 2006 9:22 am

Hi all,

I've just sent the source code for a new version of BotOfDoom to dustin, so it should be on the plugin manager soon. This version should do much better in high-card games. The main improvements are:

-BOD will take down weak players for their cards when appropriate

-the "take-over-the-world" routine is now a lot better. Given enough armies, BOD should be able to clear the board in one turn.

-a revised general strategy in high-card, low-continent games. During the first portion of the game, BOD will go after continents as usual. But as card values go up and continents become less important, BOD will abandon his continents and consolidate his armies like Reaper does. Then he just farms and looks for weak players to take out.

-Some chat commands:

bod team off - this turns off teaming between multiple BODs
bod team on - this turns teaming back on
bod beaten - BOD tells you who he's beaten on this computer in the games he's won

I haven't let BOD team with humans because of reports that humans abused this feature in Reaper.

The "team off" command should let you play 4 or 5 BODs at once without being taken out instantly.

-early in the game, when BOD wants a continent and has a dominant presence there, he will politely ask human players with armies there to farm their armies out. :)


When dustin gets the new version up on the plugin manager, try him out! Any feedback will be appreciated. :) If you are dying to get your hands on the new version I can email it to you as well.

I'm hoping my focus on improving BODs card-related skills hasn't hurt his continent play. If you think he doesn't do as well with continents, let me know.

User avatar
Bertrand
Reaper Creator
Posts: 568
Joined: Mon Nov 28, 2005 4:35 pm
Location: Montreal

Post by Bertrand » Sun Jan 29, 2006 12:45 pm

Looking forward to try him out. May the bot wars begin!

If you want, send BOD 3.0 to me at reapercreator@yahoo.ca, and i'll have him meet Reaper 2.1, who is also in "wait-for-Dustin" mode.

As for teaming with humans, you could do as I did in Reaper 2.1: only accept teaming with humans if the bot name begins with "T-". Since only the hosts can change that, it gives them absolute control.

User avatar
GregM
Luxer
Posts: 252
Joined: Wed Jun 01, 2005 4:33 pm

Post by GregM » Sun Jan 29, 2006 1:20 pm

Bertrand wrote:As for teaming with humans, you could do as I did in Reaper 2.1: only accept teaming with humans if the bot name begins with "T-". Since only the hosts can change that, it gives them absolute control.
It seems to me that when hosts used this the same thing would happen, since hosts wouldn't be able to control who the bots team with...

User avatar
AquaRegia
Lux Ambassador
Posts: 3721
Joined: Sat Jan 01, 2005 6:20 am
Location: Lounging once more at the mods' retirement villa
Contact:

Re: BotOfDoom 3.0

Post by AquaRegia » Sun Jan 29, 2006 2:20 pm

GregM wrote:early in the game, when BOD wants a continent and has a dominant presence there, he will politely ask human players with armies there to farm their armies out. :)
This is fantastic - I love it! But will BOD farm for me if I farm for him? :wink:

User avatar
GregM
Luxer
Posts: 252
Joined: Wed Jun 01, 2005 4:33 pm

Re: BotOfDoom 3.0

Post by GregM » Sun Jan 29, 2006 2:34 pm

AquaRegia wrote:
GregM wrote:early in the game, when BOD wants a continent and has a dominant presence there, he will politely ask human players with armies there to farm their armies out. :)
This is fantastic - I love it! But will BOD farm for me if I farm for him? :wink:
It might be possible. :D You'd say something like "bod farmoutof australia" and if you have a lot of armies there BOD will see if he can make use of any armies there before you sweep them away. You'd have to spell the continent name right though. :wink:

User avatar
Blind Willie
Lux Veteran
Posts: 1144
Joined: Fri May 20, 2005 3:06 am
Location: Satellite of Love

Post by Blind Willie » Sun Jan 29, 2006 3:14 pm

Awesome. BOD is a great bot, and sounds like some cool improvements.

One question: have you fixed whatever bug was causing BOD to freeze up on larger maps? It was discussed here a while ago:
http://sillysoft.net/forums/viewtopic.php?t=4397
Bertrand wrote:As for teaming with humans, you could do as I did in Reaper 2.1: only accept teaming with humans if the bot name begins with "T-". Since only the hosts can change that, it gives them absolute control.
Have you submitted 2.1 yet? Haven't noticed it in plugin manager...

User avatar
GregM
Luxer
Posts: 252
Joined: Wed Jun 01, 2005 4:33 pm

Post by GregM » Sun Jan 29, 2006 3:43 pm

Blind Willie wrote:One question: have you fixed whatever bug was causing BOD to freeze up on larger maps? It was discussed here a while ago:
http://sillysoft.net/forums/viewtopic.php?t=4397
I know about this issue, and I made some improvements that sped up BOD a bit, but it seems he still takes a long time on big maps. There's no one specific thing I can find that's a problem - he just thinks too much (mainly about taking over continents). There might be a way to switch to simpler algorithms on big maps so he would take less time...

User avatar
Bertrand
Reaper Creator
Posts: 568
Joined: Mon Nov 28, 2005 4:35 pm
Location: Montreal

Post by Bertrand » Sun Jan 29, 2006 5:17 pm

The new BOD is a force to reckoned with in high card games: he has the edge in my tests against Reaper. Impressive coding there, gregM.

However, I think he has lost something in low cards. Here are the results of a few 50-game tests; I used the classic map with Reaper, BOD, Nef, boscoe, killbot and EvilPixie. The win % are:

Reaper=37 BOD=52 4-6-8-10-15 0%
Reaper=42 BOD=41 4-6-8-10-15 15%
Reaper=72 BOD=12 4-6-8 5%
Reaper=62 BOD=18 4-5-6 5%
Reaper=46 BOD=26 5-5-5 5%

More observations to follow...

It was fun to watch Reaper and BOD duke it out, fighting to be first to eat the other bots. They look like two wolves loose in a flock of sheep.

I also experienced a few lockups, probably infinite loops in BOD's code. I can see no pattern that sets it off, and there was nothing in the log. I took some screenshots, if you want them i'll send them to you.

Blind Willie wrote:Have you submitted 2.1 yet? Haven't noticed it in plugin manager...
Reaper 2.1 is in Dustin's hands right now, probably being torture-tested before release.

User avatar
Weed
Grassman
Posts: 555
Joined: Tue Nov 29, 2005 6:33 pm
Location: PA (Damn right its a blue state)

Post by Weed » Sun Jan 29, 2006 6:03 pm

Bertrand, can you explain the "T-" thing to me? The way I see it, the host can team with Reaper, but no one else can. Am I missing something (probably)?

User avatar
GregM
Luxer
Posts: 252
Joined: Wed Jun 01, 2005 4:33 pm

Post by GregM » Sun Jan 29, 2006 6:14 pm

Bertrand wrote:I also experienced a few lockups, probably infinite loops in BOD's code. I can see no pattern that sets it off, and there was nothing in the log. I took some screenshots, if you want them i'll send them to you.
Hmmm. I think BOD did freeze once in my final round of testing, but a stack trace seemed to show the code to be in some simple function without a loop, so I figured it was my computer having problems or something. I'd like to see those screenshots.

User avatar
Bertrand
Reaper Creator
Posts: 568
Joined: Mon Nov 28, 2005 4:35 pm
Location: Montreal

Post by Bertrand » Sun Jan 29, 2006 6:17 pm

Weed wrote:Bertrand, can you explain the "T-" thing to me? The way I see it, the host can team with Reaper, but no one else can. Am I missing something (probably)?
If the host names Reaper2.1 something like "T-Purplor", then Reaper will accept "reaper team" command from *any* player, just like it does in the current version. If the name does not start with "T-", then the "reaper team" command will not work for anyone. It's not pretty, but it does give the host the power to turn the feature off.
gregM wrote:I'd like to see those screenshots.
Sending them right now. I just noticed that in both cases BOD had just taken over EU.

User avatar
Weed
Grassman
Posts: 555
Joined: Tue Nov 29, 2005 6:33 pm
Location: PA (Damn right its a blue state)

Post by Weed » Sun Jan 29, 2006 7:57 pm

Bertrand wrote:
Weed wrote:Bertrand, can you explain the "T-" thing to me? The way I see it, the host can team with Reaper, but no one else can. Am I missing something (probably)?
If the host names Reaper2.1 something like "T-Purplor", then Reaper will accept "reaper team" command from *any* player, just like it does in the current version. If the name does not start with "T-", then the "reaper team" command will not work for anyone. It's not pretty, but it does give the host the power to turn the feature off.
Ah, I see. Ingenious as usual. :mrgreen:

User avatar
Bertrand
Reaper Creator
Posts: 568
Joined: Mon Nov 28, 2005 4:35 pm
Location: Montreal

Post by Bertrand » Mon Jan 30, 2006 6:19 pm

BOD 3.0 has some funny new win messages:

What is your name?
What is your quest?
What is the square root of 97?

-- That is from "Monty Python and the quest for the holy grail", right? One of my favorite movies, I never tire of seeing it.

I did some more tests with high card games. At 5-10-15 0%, BOD clearly dominates against Reaper, winning 60% of the games. But, interestingly, at 3-6-9 0% the situation is reversed: Reaper wins 58% of the games.

I have a theory to explain this: BOD 3.0 is very enthusiastic in killing the other players to steal their cards. When the cards are worth a lot, the strategy pays off handsomely. But, in "medium cards" games like 3-6-9, the cards are worth a lot less, and maybe BOD expends too much ressources to get them.

I'll try some experiments with a modified version if Reaper to see if that makes sense. If this holds, then reducing BOD's killing frenzy in medium-low cards games would probably make him better.

User avatar
GregM
Luxer
Posts: 252
Joined: Wed Jun 01, 2005 4:33 pm

Post by GregM » Mon Jan 30, 2006 7:40 pm

Bertrand wrote:I did some more tests with high card games. At 5-10-15 0%, BOD clearly dominates against Reaper, winning 60% of the games. But, interestingly, at 3-6-9 0% the situation is reversed: Reaper wins 58% of the games.

I have a theory to explain this: BOD 3.0 is very enthusiastic in killing the other players to steal their cards. When the cards are worth a lot, the strategy pays off handsomely. But, in "medium cards" games like 3-6-9, the cards are worth a lot less, and maybe BOD expends too much ressources to get them.

I'll try some experiments with a modified version if Reaper to see if that makes sense. If this holds, then reducing BOD's killing frenzy in medium-low cards games would probably make him better.
Interesting. Thanks for doing these tests - I'll investigate what BOD is doing in 3-6-9-like games.

User avatar
dustin
Lux Creator
Lux Creator
Posts: 10433
Joined: Thu May 15, 2003 2:01 am
Location: Cascadia
Contact:

Post by dustin » Mon Jan 30, 2006 11:42 pm

Updated versions of both BotOfDoom and Reaper are now in the plugin manager. Super kudos to both of their creators for their excellent work.

User avatar
Blind Willie
Lux Veteran
Posts: 1144
Joined: Fri May 20, 2005 3:06 am
Location: Satellite of Love

Post by Blind Willie » Tue Jan 31, 2006 4:24 am

Damn...just downloaded 3.0 and it's been kicking my ass! :shock:

However, BOD is attacking with an incredibly slow and painful once-per-click that continues long after the timer has run out. Something tells me that's not supposed to happen.

User avatar
GregM
Luxer
Posts: 252
Joined: Wed Jun 01, 2005 4:33 pm

Post by GregM » Tue Jan 31, 2006 7:06 am

Blind Willie wrote:Damn...just downloaded 3.0 and it's been kicking my ass! :shock:

However, BOD is attacking with an incredibly slow and painful once-per-click that continues long after the timer has run out. Something tells me that's not supposed to happen.
There are some circumstances where BOD does "once-per-click" attacks, but in a relatively fast loop. It might go slowly if the "computer player speed" in preferences isn't set to the fastest possible, because the game will introduce a delay between successive attacks.

User avatar
Blind Willie
Lux Veteran
Posts: 1144
Joined: Fri May 20, 2005 3:06 am
Location: Satellite of Love

Post by Blind Willie » Tue Jan 31, 2006 4:07 pm

GregM wrote:There are some circumstances where BOD does "once-per-click" attacks, but in a relatively fast loop. It might go slowly if the "computer player speed" in preferences isn't set to the fastest possible...
Hmm...ok. Tried putting it on the fastest bot speed and that definitely helped, but I don't like to play with that setting. I prefer about 3/4 of the fastest speed so I can actually see what the bots are doing, instead of just seeing the aftermath when my turn comes.

Also, from what I've seen, BOD attacks once-per-click in almost all circumstances. Even when he has an overwhelming army advantage. Not sure I see the point, especially since he doesn't seem to stop even when his dice go bad.

Have been testing him on Classic Risk, cards @ 4,6,8,10,15, no cont. % increase, 37 second turns, bots at 3/4 fastest speed. Try that and see what happens.

Great bot -- kills me more often than the last version. But, imho, this is a bug that makes BOD unplayable with the settings I prefer.

User avatar
GregM
Luxer
Posts: 252
Joined: Wed Jun 01, 2005 4:33 pm

Post by GregM » Tue Jan 31, 2006 4:29 pm

Blind Willie wrote:Also, from what I've seen, BOD attacks once-per-click in almost all circumstances. Even when he has an overwhelming army advantage. Not sure I see the point, especially since he doesn't seem to stop even when his dice go bad.

Have been testing him on Classic Risk, cards @ 4,6,8,10,15, no cont. % increase, 37 second turns, bots at 3/4 fastest speed. Try that and see what happens.

Great bot -- kills me more often than the last version. But, imho, this is a bug that makes BOD unplayable with the settings I prefer.
Seems like BOD is plagued by speed issues. :cry:

I've tried those settings, and I think I see what you mean. But as I recall, there are only two times when BOD is coded to attack "once-per-click." These are in special parts of the take-over-the world and kill-a-player code, where he's splitting up a country's armies to two other countries. Since the success of the attack may depend on putting the correct proportion of armies on each of the successive subroutes, the bot uses once-per-click attacking to whittle down the two countries to 1 or 2 armies each, then calculates how many armies each of the two countries will get, then finishes them off. This helps keep dice randomness from throwing off the plan. This type of attacking shouldn't be happening elsewhere, but I'll check to see if it is.

Also, dustin, does the game in fact introduce a delay for these once-per-click attacks? If it does it probably shouldn't, as they're likely to be looped like this.

User avatar
Blind Willie
Lux Veteran
Posts: 1144
Joined: Fri May 20, 2005 3:06 am
Location: Satellite of Love

Post by Blind Willie » Tue Jan 31, 2006 5:03 pm

GregM wrote:...there are only two times when BOD is coded to attack "once-per-click." These are in special parts of the take-over-the world and kill-a-player code, where he's splitting up a country's armies to two other countries.
Ah...that makes more sense now, because it is definitely happening every time BOD is trying to kill off another player. Although it seems he does this even when he's not splitting up armies. I've seen BOD use the once-per-click even when he's killing off the last of a player's territories.

I just assumed it was happening every time, but I guess there wouldn't be a noticeable difference between per-click and until-dead when BOD was just farming empty countries.

Genius strategy, by the way. BOD has pulled off some pretty amazing kills with this method.

User avatar
GregM
Luxer
Posts: 252
Joined: Wed Jun 01, 2005 4:33 pm

Post by GregM » Tue Jan 31, 2006 5:26 pm

Blind Willie wrote:Genius strategy, by the way. BOD has pulled off some pretty amazing kills with this method.
:twisted: :smt067

User avatar
GregM
Luxer
Posts: 252
Joined: Wed Jun 01, 2005 4:33 pm

Post by GregM » Tue Jan 31, 2006 8:29 pm

Blind Willie wrote:Ah...that makes more sense now, because it is definitely happening every time BOD is trying to kill off another player. Although it seems he does this even when he's not splitting up armies. I've seen BOD use the once-per-click even when he's killing off the last of a player's territories.
OK, I've looked at the actual code and he is indeed using once-per-click attacking at all times when killing off a player or taking over the world. This will be easy to fix.

User avatar
Weed
Grassman
Posts: 555
Joined: Tue Nov 29, 2005 6:33 pm
Location: PA (Damn right its a blue state)

Post by Weed » Tue Jan 31, 2006 9:11 pm

I think it froze on me when i was waiting for host & for BOD to finish attacking...tho I was offline anyway.

User avatar
dustin
Lux Creator
Lux Creator
Posts: 10433
Joined: Thu May 15, 2003 2:01 am
Location: Cascadia
Contact:

Post by dustin » Thu Feb 02, 2006 6:05 pm

GregM wrote:Also, dustin, does the game in fact introduce a delay for these once-per-click attacks? If it does it probably shouldn't, as they're likely to be looped like this.
I think that it does. You're probably right that it shouldn't. I've also thought that I should eliminate or lower the delay when the turn time is very fast so bots don't overlap it as much.

User avatar
eowyn
Luxer
Posts: 62
Joined: Sun Nov 14, 2004 12:17 am
Location: South Ithilien (Texas)
Contact:

Post by eowyn » Sun Feb 05, 2006 8:45 am

I'd like to urge the release of BOD 3.1.

3.0 is hanging on me. I leave my Mac (dual 1.8 G5) auto-hosting at night with either Beleriand, Middle Earth, or Armengia. With any of the 3 (but I thing Beleriand does it quicker), eventually BOD will take infinite time to take its turn.

If I'm around, I can rs the game, but lately I've just been taking BOD out of the bots playing. Which is a shame, as it is neck and neck with Reaper for the toughest bot.

To reproduce, you may need to use the cards and continents settings I use: 3,6,9... and 5% (sometimes 10%).

User avatar
AquaRegia
Lux Ambassador
Posts: 3721
Joined: Sat Jan 01, 2005 6:20 am
Location: Lounging once more at the mods' retirement villa
Contact:

Post by AquaRegia » Sun Feb 05, 2006 11:37 am

BOD just froze on me also - playing AtG's new "2112" map, 28s turns, 4,6,8,10,15...

2 BOD were playing and one just timed out, with "waiting for host" message.

User avatar
GregM
Luxer
Posts: 252
Joined: Wed Jun 01, 2005 4:33 pm

Post by GregM » Sun Feb 05, 2006 3:32 pm

Very strange stuff. :?

After freezes, you should check the logfile - there probably won't be anything unusual there but if there is it would be useful.

Also if you notice anything in particular about when the freezes happen, it might help find the bug.

I'll try the settings you guys have suggested and see if I can figure out what's going on.

User avatar
Bertrand
Reaper Creator
Posts: 568
Joined: Mon Nov 28, 2005 4:35 pm
Location: Montreal

Post by Bertrand » Sun Feb 05, 2006 6:34 pm

dustin wrote:
GregM wrote:Also, dustin, does the game in fact introduce a delay for these once-per-click attacks? If it does it probably shouldn't, as they're likely to be looped like this.
I think that it does. You're probably right that it shouldn't. I've also thought that I should eliminate or lower the delay when the turn time is very fast so bots don't overlap it as much.
Dustin, when the "Computer player speed" slider is all the way to the left, how about eliminating the delays when randomly picking countries at game start? When playing many bot-only games, country-picking makes the games last much longer than they should.
GregM wrote:Also if you notice anything in particular about when the freezes happen, it might help find the bug.
It happened to me four times, and in *all* cases BOD had just taken over EU.

User avatar
GregM
Luxer
Posts: 252
Joined: Wed Jun 01, 2005 4:33 pm

Post by GregM » Sun Feb 05, 2006 6:41 pm

Bertrand wrote:
GregM wrote:Also if you notice anything in particular about when the freezes happen, it might help find the bug.
It happened to me four times, and in *all* cases BOD had just taken over EU.
Fascinating. I've reproduced the freezing the "War of 2112" map and am trying to figure out what caused it. I was lucky enough to be watching when it happened and BOD had just taken over a continent. Perhaps there is something to do with continent numbering, if it's happening when BOD takes over Europe...

User avatar
rob
Lux Addict
Posts: 593
Joined: Thu Apr 01, 2004 10:21 pm

Post by rob » Sun Feb 05, 2006 11:11 pm

the best bot yet! :smt023

Post Reply