Dr. Strangebot

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

Moderator: Defcon moderators

User avatar
kudayta
Introversion Staff
Introversion Staff
Posts: 945
Joined: Mon Aug 09, 2010 7:25 pm

Postby kudayta » Wed Mar 23, 2011 5:27 am

poptart911 wrote: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.


In this game, I placed just a few units before Defcon 4. I placed a battleship and four subs up high to scout and be a thorn in the enemy carrier's side for a bit (they have to switch to anti sub to kill the subs, giving me time to hit them with planes), 4 subs in the Arabian to hit SE Europe, 4 subs under the Ivory Coast to hit the Iberian Penninsula, 4 carriers as gatekeeper, and one more battleship to slow down any advancing force. I held the rest of my ships until after Defcon 4, to see how he had placed his ships and reacted to that. Happily, all of his carriers were in radar range, in a nice tight formation. I placed my battleships right on top of them.
User avatar
roflamingo
level3
level3
Posts: 404
Joined: Fri Jan 19, 2007 10:25 am

Postby roflamingo » Wed Mar 23, 2011 8:23 am

when i wrote ROFLBot in LUA i focused heavy in placement. In doesn't win you the game but can definitely lose it.

what i did was enumerate my cities, try to quickly find clumps of them.

then use code to figure out if there are any enemy borders nearby. if there are, then exclude area from placement.

place the first silo in a good spot. then repeat the loop to place the rest of the silos, airbases, and then finally radar on the outside.

it worked great, except if you were europe and had africa and russia as enemies. then it's impossible to hide everything from radar.

Good Luck!
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 4:55 pm

Boiling placement down:

  1. Generally speaking, a scout battleship or two (sometimes more) is a good idea. After Defcon 4, you can then decide a 'better' placement area for your main fleet with whatever intelligence your scouts have obtained. Six player default is an exception because that mode is all about 'grab the most points first and disregard regular fighting'.
  2. Generally speaking, your fleets should swim together. That is, have one or two very large groups with maybe one small ninja fleet for a surprise sneak attack/flank.
  3. Almost everyone has learned to keep fleets broadside to the enemy. Think of your fleet (no matter the number of ships) as one giant galleon. You must turn the whole beast parallel in order to make the most of it's firepower. Defcon is the same way; a disorganized or inefficient formation can cost you the battle. Of course, you must keep it that way the entire battle, moving in response to or actively forcing your opponent to move.
  4. Never allow lone carriers in unsafe waters. For example, if it's Russia vs Asia, lone carrier/s in the Pacific is bad for both territories. However, Russia can use it's safe zone in the Arctic Ocean while Asia has the entire Indian. A lone carrier is one that has zero naval support within a reasonable range.


There is also the matter of moving ships around. I noticed that your bot will give ships orders that are too far. For example, I set the bot as EU and the AI as Russia. Your bot placed ships in the North Atlantic and proceeded to order all of them to the Arctic over Moscow. Now, the destination is fine, but giving ships one 'long' order is far worse than several smaller ones. I.e., that trip should have been made in four or five steps.

Breaking up the fleet orders into smaller steps will help eliminate odd behaviors and unnecessary turning. In the example above, the ships made a complete circle before heading north to pass Iceland. This is because of where the travel nodes are (and I believe because there are so few of them).

In other words, don't tell them to go straight from New York to Moscow and then leave it up to game mechanics to plan the best route, else you'll get a completely disorganized bunch of ships going in all directions at first. Instead. tell them to go from New York to just west of London, then from there to due east of Iceland, then to Norway, and from there to the Barents Sea (or Finland).

Lastly, it appeared that at least one game the bot placed all the ships as one or two fleets, even though they were not together. You may want to make sure your ship placement code isn't placing single fleets when you really want multple ones. You can use the debug mode to check the fleetID's.

If your code is too fast, single ships placed on opposite sides of the map will be counted as one fleet, and therefore both ships must recieve the same orders (they can not be ordered individually). In short, the best method for bot fleets is single ships, single fleets, and then have some sort of code that pulls single ships together in groups. This allows the most flexibility and gives the bot a great advantage as it can micromanage like no human.

My code, however crappy/buggy/worthless, placed single fleets and then looked at each ship and it's proximity to enemy ships, or last known location. Failing that, the first BB it came to. If that ship had other ships around it (certain distance), it became the leader and all others followed. The leader then got orders and followers mirrored the orders with an offeset to keep them from piling on top of each other. Two offsets actually, one for the leader and one for any enemy ships (to keep the whole formation tight). You can see this in action in the video. If there were no BB's, then a carrier was assigned leadership and the rest followed.

I was going to use the same method for bombers so I could make epic bombing runs as well as have them 'chat'. You know, "All wings report in...", "Red Ten standing by", "Red Seven standing by" (bomber gets taken out) "We've lost Dutch!", (3/6 destroyed) "[Gold Leader] We're too close!", "[Gold Five] Stay on target!".

:P
Gallipolopoly
level0
Posts: 5
Joined: Sat Nov 28, 2009 7:59 pm
Contact:

Postby Gallipolopoly » Thu Apr 07, 2011 11:28 am

Ace Rimmer wrote:I was going to use the same method for bombers so I could make epic bombing runs as well as have them 'chat'. You know, "All wings report in...", "Red Ten standing by", "Red Seven standing by" (bomber gets taken out) "We've lost Dutch!", (3/6 destroyed) "[Gold Leader] We're too close!", "[Gold Five] Stay on target!".

I don't post often, but I felt this had to be said:

This is the single greatest idea ever conceived in the history of DEFCON. Ever.
User avatar
poptart911
level1
level1
Posts: 33
Joined: Thu Jan 13, 2011 6:04 pm
Location: Iowa, US
Contact:

Postby poptart911 » Wed Apr 13, 2011 7:09 am

thanks for all of the feedback guys! I'm working hard on adding some major features and taking out some crappy code. It's coming close to the due date for the school project, so I want to get it to a good milestone soon.

I plan to keep working on Dr. Strangebot after the semester is over.

Here is a list of recent changes:

Fixed the bug where the bot doesn't attack asia from the sea
Fixed the 0,0 bug (actually very related)
Added a launch condition for the subs
Changed the silos to launch from a global target queue
Changed the algorithm for picking targets (currently broken)
Made better boid goals for all ships.
Bombers do the wave (will make them choose closer targets soon)
Added new behavior for survival score mode
Reduced cpu usage by a lot :)
Completely removed the need for multithreading
Made silo cluster spawn further away from enemy radar cover (thanks ace!)
Added a launch condition for silos (currently broken)

Once again I thank you all for you help and advice. I will soon tag a 1.0 for the bot for all to play against! (and then keep working on it)
User avatar
Ace Rimmer
level5
level5
Posts: 10803
Joined: Thu Dec 07, 2006 9:46 pm
Location: The Multiverse

Postby Ace Rimmer » Wed Apr 13, 2011 2:31 pm

poptart911 wrote:Completely removed the need for multithreading

:shock:

/me goes to look at code, which I probably won't understand
Smoke me a kipper, I'll be back for breakfast...
User avatar
jon
level4
level4
Posts: 537
Joined: Sun Mar 06, 2011 10:15 pm
Location: London
Contact:

Postby jon » Thu Apr 14, 2011 12:16 pm

Gallipolopoly wrote:
Ace Rimmer wrote:I was going to use the same method for bombers so I could make epic bombing runs as well as have them 'chat'. You know, "All wings report in...", "Red Ten standing by", "Red Seven standing by" (bomber gets taken out) "We've lost Dutch!", (3/6 destroyed) "[Gold Leader] We're too close!", "[Gold Five] Stay on target!".

I don't post often, but I felt this had to be said:

This is the single greatest idea ever conceived in the history of DEFCON. Ever.


Agreed. I would be so happy if this happened
88mm
level0
Posts: 1
Joined: Fri Apr 22, 2011 11:40 am

Postby 88mm » Sat Apr 23, 2011 6:48 pm

i'de like to try this AI, but i ran into a problem, I opened the Data file with ZIP and looked around but see no AI folder to place it. So thats my question, where do you place your files?
User avatar
xander
level5
level5
Posts: 16861
Joined: Thu Oct 21, 2004 11:41 pm
Location: Riverside, CA, USA
Contact:

Postby xander » Sat Apr 23, 2011 8:11 pm

It requires a special version of Defcon. Read this.

xander

Return to “AI Bots”

Who is online

Users browsing this forum: No registered users and 1 guest