DEFCON AI BOT API

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

Moderator: Defcon moderators

User avatar
sfericz
level5
level5
Posts: 1336
Joined: Thu Mar 27, 2008 7:25 am
Location: USA
Contact:

Postby sfericz » Mon Jan 19, 2009 5:03 am

krmgkt58 wrote:Think of what highly educated military strategist who graduated summa cum laude from Westpoint would do if you told him to play Defcon.


I would acutally love to see how 'they' would approach a game like Defcon. But the question is, which would they pick to be the disposable unit? (damn bullet pillows!)


Martin: I am going to try and work on an AI bot (for educational purposes), I'm not sure how much will come of my attempt. But anything I might come up with I will be sure to send your way.
User avatar
tllotpfkamvpe
level5
level5
Posts: 1768
Joined: Fri Aug 31, 2007 12:04 am
Contact:

Postby tllotpfkamvpe » Mon Jan 19, 2009 6:15 pm

I suggest the bot keeps a ranking strategy against every person it plays, much like Berts dedcon rankings. That way the Bot can chose to play high risk or low risk moves.

Also the IV bot could just be improved to place smaller fleets, no sub mixing! and bunch silos together or better silo launch determintaion.
User avatar
martin
level5
level5
Posts: 3210
Joined: Fri Nov 19, 2004 8:37 pm
Location: ::1
Contact:

Postby martin » Mon Jan 19, 2009 6:23 pm

tllotpfkamvpe wrote:I suggest the bot keeps a ranking strategy against every person it plays, much like Berts dedcon rankings. That way the Bot can chose to play high risk or low risk moves.


I'd already thought of this, the problem with it is finding a way of "describing" a strategy. I could hardcode in strategies, and then it can rank the success of strategies at certain times/enemy unit dispositions (in which case it needs a good way of describing the situation this tactic last worked in, and comparing to see if this new situatiom is similar), or I could make it generate new strategies, in which case I need ways of describing the strategy, and the tactics, and quantifying if this attack failed becaise of flawed strategy or tactics.
The problem is that defcon is such a complex game, a failure in an attack could be due to many many reasons, and ranking strategies is thus pretty damned hard to do.
GENERATION 22:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
The Baron
level0
Posts: 3
Joined: Mon Jan 19, 2009 8:40 pm

Postby The Baron » Mon Jan 19, 2009 9:05 pm

I like this idea of having a bot API, props to the Defcon team and those behind it. It'll definitely be interesting how good these bots get over time. Coming up with AI that will defeat advanced players without cheating is notoriously difficult in any game. Not had a good look at the API yet, but it'll also be interesting to have an AI that could signal what it plans to do to allies, in chat, and perhaps engage in diplomacy; for the times when 6 players aren't available.

I'll be having a go at creating a bot, as a learning exercise for myself. First stop would be to defeat the default AI. [/list][/list]
User avatar
martin
level5
level5
Posts: 3210
Joined: Fri Nov 19, 2004 8:37 pm
Location: ::1
Contact:

Postby martin » Mon Jan 19, 2009 9:09 pm

Indeed, I plan to "level up" my bot on AIs first.

Also, as far as I know, there is no way for a bot to read the chat?
GENERATION 22:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
User avatar
Ace Rimmer
level5
level5
Posts: 10803
Joined: Thu Dec 07, 2006 9:46 pm
Location: The Multiverse

Postby Ace Rimmer » Mon Jan 19, 2009 9:20 pm

martin wrote:Indeed, I plan to "level up" my bot on AIs first.

Should be very easy, this could be done with only a few improvements, hehe only a couple from below would be enough:

  1. Grouped single ship fleets/not allowing mixed fleets
  2. Not placing ground units within enemy radar range
  3. Removing kamikaze tactic, defined below:
    1. Ordering empty bombers at cities, as if they could nuke them O_o
    2. Ordering planes to arbitrary points where no enemy exists
    3. Ordering planes (especially bombers) in single file on direct course to enemy ships, with no support/protection
    4. Ordering bombers in single file across the globe to nuke cities, with no protection.
  4. Clustering silos
  5. Placing airbases within reasonable range of silos, for protection
  6. Timed and orderly launches, rather than chaotic and dispersed strikes
  7. Protecting surfacing subs with surface fleet
  8. Reloading carriers with fighters
  9. Organized and purposeful fleet movements rather than constant chaotic movement between AI nodes
The Baron
level0
Posts: 3
Joined: Mon Jan 19, 2009 8:40 pm

Postby The Baron » Tue Jan 20, 2009 12:38 am

martin wrote:Also, as far as I know, there is no way for a bot to read the chat?


After glancing through, it looks like that's the case. Still, it's C++, they can still talk between each other, but it'd be a lot more work.

The bots look like they'll be able to tell where the nukes are going. Curious to know what effect that will have; though I don't expect it'll be a problem for the better players.
User avatar
martin
level5
level5
Posts: 3210
Joined: Fri Nov 19, 2004 8:37 pm
Location: ::1
Contact:

Postby martin » Tue Jan 20, 2009 10:44 am

That's a shame. I'm not going to build a networking system separate to defcon just so that the bots can chat :P

What do you mean? As far as I can see they can see where their own nukes are going (just like the "orders" overlay) but not enemy ones. Unless you mean looking at the curve and extrapolating, in which case yes, I suppose bots can work out where a nuke is going to land (anyone got any ideas on what function is used to plot nuke paths, I'll need to know eventually for that I suppose).

Also an update, working on the global survey stuff at the mo, also learning lua, since I'd never even look at it before a few days ago :P
GENERATION 22:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
User avatar
Ace Rimmer
level5
level5
Posts: 10803
Joined: Thu Dec 07, 2006 9:46 pm
Location: The Multiverse

Postby Ace Rimmer » Tue Jan 20, 2009 4:21 pm

If bots can work out enemy nuke targets, naval nuking would be near impossible. :shock: And yes, bots should be able to use naval nukes with a fair amount of effectiveness if they are to be considered "great". I predict that in any bot war, the one that can use naval nukes (better, if both can) will win out over the other every time.
Smoke me a kipper, I'll be back for breakfast...
User avatar
martin
level5
level5
Posts: 3210
Joined: Fri Nov 19, 2004 8:37 pm
Location: ::1
Contact:

Postby martin » Tue Jan 20, 2009 7:03 pm

Is naval nuking really that useful? surely as soon as the enemy launches a single nuke, and nothing else you can guess it's probably a naval nuke and move your fleets about a bit?
GENERATION 22:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
User avatar
trickser
level5
level5
Posts: 1823
Joined: Thu Mar 06, 2008 2:15 pm
Location: The Senate ; GMT+1
Contact:

Postby trickser » Tue Jan 20, 2009 7:07 pm

You can carpet nuke the area where a ship can go in the time the nukes are flying, and so kill it with 100%.
If you have many ships near each other it becomes even more useful.
While battleship and bomber shots can only kill one ship at a time and only with a lower probability.
User avatar
Ace Rimmer
level5
level5
Posts: 10803
Joined: Thu Dec 07, 2006 9:46 pm
Location: The Multiverse

Postby Ace Rimmer » Tue Jan 20, 2009 7:12 pm

martin wrote:Is naval nuking really that useful? surely as soon as the enemy launches a single nuke, and nothing else you can guess it's probably a naval nuke and move your fleets about a bit?

Very useful when you understand the two main reasons/times to use it.

1. Psychological: You force the enemy fleet to become reactive instead of proactive, defensive instead of offensive, you can scatter his forces (panic) and break his lines, and you might just make yourself appear stronger than you are in certain areas.

2. Actual fleet damage: You might just actually hit some ships, like subs that just surfaced. This is especially the case in tight quarters where you can move an enemy into a choke point.

Combine the two like so...

Enemy is moving south by Iceland, you throw in a few nukes ahead of him in a first wave so he begins to move back. "Oh noes! Retreat!!!" While he's retreating, you then have a second wave ready to nuke his ships now clustered together in the panic with almost nowhere to go for a few moments.
Smoke me a kipper, I'll be back for breakfast...
The Baron
level0
Posts: 3
Joined: Mon Jan 19, 2009 8:40 pm

Postby The Baron » Wed Jan 21, 2009 1:57 pm

What do you mean? As far as I can see they can see where their own nukes are going (just like the "orders" overlay) but not enemy ones. Unless you mean looking at the curve and extrapolating, in which case yes, I suppose bots can work out where a nuke is going to land (anyone got any ideas on what function is used to plot nuke paths, I'll need to know eventually for that I suppose).


Apologies if this is a bit daft (I've not experimented with these functions yet), but wouldn't the API functions GetCurrentTargetId(unitId) and GetMovementLocation(unitId) be able to spot where nukes etc... are headed? Or would they return -1 or something for enemy units?
User avatar
martin
level5
level5
Posts: 3210
Joined: Fri Nov 19, 2004 8:37 pm
Location: ::1
Contact:

Postby martin » Wed Jan 21, 2009 2:21 pm

I see what you mean.

To be honest I don't know. If you can use those methods like that I won't (not in any final version anyway), because I want my bot to win through being good - not cheating :P

I imagine that those functions would return nil if you input an enemy unitID
GENERATION 22:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
User avatar
Nightwatch
level5
level5
Posts: 1288
Joined: Wed Sep 19, 2007 3:02 pm
Location: Germany

Postby Nightwatch » Wed Jan 21, 2009 4:10 pm

Naval nuking is not cheating :roll:

Just stupid when not deployed correctly.
It's so funny to watch how most players waste shitloads of nukes to kill two or three ships.
They seem to have forgotten that bombers can kill ships without nukes just fine.

Against an experienced player with good evading skills it’s useless unless you catch him off guard or you’re really really good at naval nuking.

Return to “AI Bots”

Who is online

Users browsing this forum: No registered users and 3 guests