Dr. Strangebot

Come in here to talk about your sky-net style world-destroying super bots!

Moderator: Defcon moderators

User avatar
rus|Mike
level5
level5
Posts: 2750
Joined: Thu Jun 28, 2007 5:52 pm
Location: Russia, St. Petersburg

Postby rus|Mike » Fri Feb 11, 2011 5:03 pm

Okay, here are sample silo/other stuff placements for RU vs EU and NA vs SA. Single line is enemy ground radar max range (have to place outside of it), double line is enemy probable fleet scouting capabilities (have to place outside of it also), circle is the cities the cluster is going to try to protect (have to have at least ome of that. All 3 conditions are met for all parties on the screens. The conditions are enlisted in the order of declining importance.
Image
Image
I'm pretty sure default AI won't be able to do much about such placements when they are apropriatelly protected by a fleet.
User avatar
poptart911
level1
level1
Posts: 33
Joined: Thu Jan 13, 2011 6:04 pm
Location: Iowa, US
Contact:

Postby poptart911 » Tue Feb 15, 2011 12:04 am

Okay, so I haven't gotten it to place the cluster in a smart location yet, but I checked out putting the silos in a ring formation. I ran mulitple simulations in 1 v 1 against the default cpu player and found that a radius of about 10 provides the best cover. (silos that fall off the edge of the territory are placed randomly)

The only problem is getting all of the important cities under the protective cover of the cluster. For example, the bot loses NY and the west coast when it plays as North America, and it loses Cairo when it plays as Africa or mexico city in SA.

This ring formation works very well in europe. The bot wins scores 175 or more consistently against russia or russia and asia.

Now I just have to place the ring so that the big cities are covered. Perhaps I'll test random points and pick a configuration based on %population covered as a hueristic.

EDIT: rus|Mike what you told me was very helpful.
User avatar
kudayta
Introversion Staff
Introversion Staff
Posts: 945
Joined: Mon Aug 09, 2010 7:25 pm

Postby kudayta » Tue Feb 15, 2011 12:58 am

Instead of thinking about silo placement as a defensive measure, think of it as an offensive measure that you want to hold in reserve as long as possible. Don't worry about covering big cities with air defense, just worry about covering some cities with air defense.

I'm not sure how to express that sentiment mathematically, but remember that you get 2 points for a megakill and only lose one point for a megaloss in this game. So, offense is what you should be concentrating on.
User avatar
Ace Rimmer
level5
level5
Posts: 10803
Joined: Thu Dec 07, 2006 9:46 pm
Location: The Multiverse

Postby Ace Rimmer » Tue Feb 15, 2011 6:59 pm

kudayta is absolutely correct. You want to have the bot place with the expectation that it will lose 100% of it's people anyway. That is the way to win at Defcon, every time.

Also, simulations vs CPU or even bot are very limited. Both lack creativity and know-how to exploit. I wouldn't put too much time into figuring out how to get the most out of bot vs bot or bot vs CPU (especially that one), assuming you want real people to play vs your bot at some point. In the end, you'll just have to re-write how the bot plays once it gets some human action.

Lastly, keep your code up to date, 'cause eventually I'm going to get back into my bot and would love to have a working example to look at.
Smoke me a kipper, I'll be back for breakfast...
User avatar
trickser
level5
level5
Posts: 1826
Joined: Thu Mar 06, 2008 2:15 pm
Location: The Senate ; GMT+1
Contact:

Postby trickser » Wed Feb 16, 2011 1:51 am

poptart911 wrote:The only problem is getting all of the important cities under the protective cover of the cluster. For example, the bot loses NY and the west coast when it plays as North America, and it loses Cairo when it plays as Africa or mexico city in SA.

The difference between a big city and another are 2 or 3 nukes.The exponential relation between hits and score can be confusing. Its very easy to score the 1st 50% of possible score (maybe 20 nukes in a default 1v1) but very hard to score the last possible point (maybe 50 nukes in a default 1v1). Therefore if you think about protection its best to protect many cities in a small cluster no matter of population size.
Last edited by trickser on Wed Feb 16, 2011 12:56 pm, edited 1 time in total.
User avatar
poptart911
level1
level1
Posts: 33
Joined: Thu Jan 13, 2011 6:04 pm
Location: Iowa, US
Contact:

Postby poptart911 » Wed Feb 16, 2011 6:35 am

Okay so two things. I'm going to stop worrying about where to place the cluster, and possibly revisit it later.

Also, I put the source code into a public repo at github. If you have an account or sign up for a free one, you can watch the repo and get a new zip file of the source whenever I work on it. It lives at https://github.com/owen2/Strangebot


EDIT: I came back and decided to weighted average the total cities with a big to figure out where to place the silo hive. It seems to work okay, but it sometimes puts the silos into harm's way.
Last edited by poptart911 on Thu Mar 17, 2011 9:51 pm, edited 1 time in total.
User avatar
poptart911
level1
level1
Posts: 33
Joined: Thu Jan 13, 2011 6:04 pm
Location: Iowa, US
Contact:

Update

Postby poptart911 » Thu Mar 17, 2011 9:49 pm

Things are looking pretty good about now. The version I checked in to github most recently beats the CPU in all 1v1 configurations, unless they use the navy to immediately attack the silos. I'm working on a better navy strategy and a formula to decide when to launch a full scale attack.

Any thoughts?

Owen

P.S. Here's the zip for the latest code: http://github.com/owen2/Strangebot/zipball/master
User avatar
poptart911
level1
level1
Posts: 33
Joined: Thu Jan 13, 2011 6:04 pm
Location: Iowa, US
Contact:

Postby poptart911 » Fri Mar 18, 2011 7:54 am

Just made the navy into a boid based system. It looks pretty sweet. First test seems to be a win. I pushed the boids code to github.
User avatar
poptart911
level1
level1
Posts: 33
Joined: Thu Jan 13, 2011 6:04 pm
Location: Iowa, US
Contact:

Postby poptart911 » Tue Mar 22, 2011 3:06 am

Okay, so the project is coming along. I would like you all to test the bot for me and give me as much feedback as you can! Here's a zip of the code: http://github.com/owen2/Strangebot/zipball/master You might have to rename the folder to strangebot. Test away!
User avatar
Ace Rimmer
level5
level5
Posts: 10803
Joined: Thu Dec 07, 2006 9:46 pm
Location: The Multiverse

Postby Ace Rimmer » Tue Mar 22, 2011 4:25 pm

I'll try this as soon as I get a chance. Too bad you weren't a few hours earlier or I would have had time to test it out yesterday.

Pre-test congrats; excellent work!
Smoke me a kipper, I'll be back for breakfast...
User avatar
poptart911
level1
level1
Posts: 33
Joined: Thu Jan 13, 2011 6:04 pm
Location: Iowa, US
Contact:

Postby poptart911 » Tue Mar 22, 2011 7:44 pm

Ace Rimmer wrote: Too bad you weren't a few hours earlier or I would have had time to test it out yesterday.


Well, it looks like most of you are in the UK. There's a little bit of a time difference, unfortunately. :(
User avatar
Ace Rimmer
level5
level5
Posts: 10803
Joined: Thu Dec 07, 2006 9:46 pm
Location: The Multiverse

Postby Ace Rimmer » Tue Mar 22, 2011 7:59 pm

I'm on your side of the pond; Atlanta. :P

(was working from home yesterday, so nighttime became 'un-free')

Edit: is there any mode the bot can't play?
User avatar
poptart911
level1
level1
Posts: 33
Joined: Thu Jan 13, 2011 6:04 pm
Location: Iowa, US
Contact:

Postby poptart911 » Tue Mar 22, 2011 8:34 pm

It does default and genocide. I have a plan for the survival mode, but I haven't coded it up yet. I hope to do that by Thursday.
User avatar
Ace Rimmer
level5
level5
Posts: 10803
Joined: Thu Dec 07, 2006 9:46 pm
Location: The Multiverse

Postby Ace Rimmer » Wed Mar 23, 2011 12:33 am

Alrighty, tested out Dr. Strangebot, and have to say it needs some work. I only had time to play one game so I loaded up two instances of Defcon and actually played the bot myself. I recorded the whole thing with Fraps (my game play), but it'll be a pain to upload it at the moment. I tried recording it's game play as well, but that didn't work.

Of course, why go easy on the bot? I used the Star as a good test. :P

Anyway, here's the end results:

Defcon 4 reveals this: (not good for Dr. S)
Image

End of the game:
Image

Some Dr. S technical difficulties. It appears you still have some 0,0 (or nil) coordinate orders in there somewhere. Dr. S nuked 0,0 at least once during the game and this screenie was taken after the game was over. I'm guess the fleet got 'stuck' here.

Image

Dr. S launched right at Defcon 1; is this supposed to happen?

Needs correction:

Airbases had zero protection (too far from silos) and are in enemy radar.
Bombers were launched right at me, single file, for easy killing.
Fleets seemed to be placed haphazardly (not in a useful formation of any kind).

This is what you want (style may vary):

GammaBot fighting naval battle: (starts about 1m in)



Overall I'll say... Keep It Coming! (we need a fully functional bot)
User avatar
poptart911
level1
level1
Posts: 33
Joined: Thu Jan 13, 2011 6:04 pm
Location: Iowa, US
Contact:

Postby poptart911 » Wed Mar 23, 2011 4:32 am

So I learned some things.

1. Looks like the navy had no goal, so it gravitated to 0,0. That's not good. After some tests it seems to have something to do with asia, but could be a number of things. :?

2. Having the silo hive detectable immediately is very bad. :? I need to make sure that they are not in radar ranger at spawn.

Right now the airbases and fleets spawn at random. ( I guess some of the radars do too. )

Once, I de-random all placements and fix the navy goal function, things should be a lot better.

Thanks for the help Ace. It really showed me a lot to see it play against something other than the IV bot. ( it isn't a very good opponent. )

Now, what I need is more placement advice. I can see in the screenies above the centralized everything, that is specifically placed to not be detected. Seems like a good plan. Any other input?

Also I looked at some of the strategic air command topics about navy formations and didn't find much useful. I'd like to keep the boids, and I have some improvement plans, but I was wondering about some good starting positions. If you all would be so kind, post some screenshots of how you start your units, navy and otherwise and maybe some explanation of why you did things that way. It would really help.

Return to “AI Bots”

Who is online

Users browsing this forum: No registered users and 4 guests