Dr. Strangebot
Moderator: Defcon moderators
- poptart911
- level1
- Posts: 33
- Joined: Thu Jan 13, 2011 6:04 pm
- Location: Iowa, US
- Contact:
Dr. Strangebot
Hi all,
I've adopted a defcon bot for an academic project. I'm a big fan of the game, and the defcon world poses some huge challenges. I'll be writing the bot in native C++. I plan to incorporate diplomacy and some probabilistic decisions. This is a school project, so you can be sure that I will see this through. I'll post the binaries regularly and the source when it's done.
Owen J
EDIT: I have the bot's source in a public github repo. Dr. Strangebot lives here: https://github.com/owen2/Strangebot
I've adopted a defcon bot for an academic project. I'm a big fan of the game, and the defcon world poses some huge challenges. I'll be writing the bot in native C++. I plan to incorporate diplomacy and some probabilistic decisions. This is a school project, so you can be sure that I will see this through. I'll post the binaries regularly and the source when it's done.
Owen J
EDIT: I have the bot's source in a public github repo. Dr. Strangebot lives here: https://github.com/owen2/Strangebot
Last edited by poptart911 on Wed Feb 16, 2011 6:36 am, edited 1 time in total.
- Sam Kennedy
- level1
- Posts: 20
- Joined: Wed Dec 01, 2010 11:33 am
- Location: Newcastle
- poptart911
- level1
- Posts: 33
- Joined: Thu Jan 13, 2011 6:04 pm
- Location: Iowa, US
- Contact:
LUA vs C++
Perhaps I will use lua instead. The luabot bindings seem to work okay, and the lua language is more abstract than C++, so I think it may be more appropriate for an AI project. I'll a little more closely at both languages because I don't really know either of them yet. (I usually use python or PHP)
Does anyone know of a working python binding? I'm not sure if I know how to make my own, but I know it can be done.
Does anyone know of a working python binding? I'm not sure if I know how to make my own, but I know it can be done.
- poptart911
- level1
- Posts: 33
- Joined: Thu Jan 13, 2011 6:04 pm
- Location: Iowa, US
- Contact:
Bug
Anyone notice that the function doesn't work? It always returns 6.
EDIT: actions don't actually happen until the next tick. So if you have a loop that tries to place all silos in 1 tick using, it won't work.
Anyway, lua it is. I really like lua so far. And it appears diplomacy can be done with bots. The agent currently asks for alliances in defcon 5.[/code]
Code: Select all
GetRemainingUnits(unittype)
EDIT: actions don't actually happen until the next tick. So if you have a loop that tries to place all silos in 1 tick using
Code: Select all
while GetRemainingUnits() > 0
Anyway, lua it is. I really like lua so far. And it appears diplomacy can be done with bots. The agent currently asks for alliances in defcon 5.[/code]
Last edited by poptart911 on Thu Jan 27, 2011 5:42 pm, edited 1 time in total.
- poptart911
- level1
- Posts: 33
- Joined: Thu Jan 13, 2011 6:04 pm
- Location: Iowa, US
- Contact:
Progress
Dr. Strangebot now picks the best (hopefully) possible alliance and sends a request to join it. Also, I'm building a world perception layer that I will share with you when it is completed.
Here's a permalink to the latest source of the bot. When I update it, it will be available here in its latest version: http://owenjohnson.info/dev/defcon/strangebot.zip
Here's a permalink to the latest source of the bot. When I update it, it will be available here in its latest version: http://owenjohnson.info/dev/defcon/strangebot.zip
- tllotpfkamvpe
- level5
- Posts: 1698
- Joined: Fri Aug 31, 2007 12:04 am
Re: Progress
Dear Owen,
so far no Bot has come to alive. I hope, yours will make it.
Consider this: There are four players. One is EU, one is Russia, one is Africa and your Bot is Asia.
Which one will your Bot choose to ally with?
so far no Bot has come to alive. I hope, yours will make it.
poptart911 wrote:Dr. Strangebot now picks the best (hopefully) possible alliance and sends a request to join it.
Consider this: There are four players. One is EU, one is Russia, one is Africa and your Bot is Asia.
Which one will your Bot choose to ally with?
- poptart911
- level1
- Posts: 33
- Joined: Thu Jan 13, 2011 6:04 pm
- Location: Iowa, US
- Contact:
Re: Progress
Schubdüse wrote:Consider this: There are four players. One is EU, one is Russia, one is Africa and your Bot is Asia.
Which one will your Bot choose to ally with?
The bot would choose Russia assuming all three opponents were independent based on the highest amount of shared radar coverage. If Africa and Europe were a team, then it would attempt to join that team. (Assuming all human players)
The bot will not ask [CPU] players for alliances because the introversion AI never accepts them. [/quote]
Re: Progress
poptart911 wrote:Schubdüse wrote:Consider this: There are four players. One is EU, one is Russia, one is Africa and your Bot is Asia.
Which one will your Bot choose to ally with?
The bot would choose Russia assuming all three opponents were independent based on the highest amount of shared radar coverage. If Africa and Europe were a team, then it would attempt to join that team. (Assuming all human players)
Interesting! But your Bot should ally with Africa. Africa and Asia vs EU and Russia is a nearly 100% win. This would be of course unfair, boring and lame. But Africa would be the most logically ally. 3vs1 could be risky, because the single player could nuke many, many cities and therefore could score more points than the others.
- poptart911
- level1
- Posts: 33
- Joined: Thu Jan 13, 2011 6:04 pm
- Location: Iowa, US
- Contact:
I'm an intermediate player at and I never thought about that way. Currently the algorithm uses shared radar cover as a heuristic ( a function that estimates "goodness" ). So perhaps I need to take some more factors into consideration.
I think I will update the heuristic to include the total enemy population that would result considering the alliance is formed. Thanks a lot for the tip.
Does anyone have any other suggestions for picking the "best" ally?
Also what are your ideas about silo placements? I hear lots of people saying that bunched silos do best, but my intuition says otherwise.
I think I will update the heuristic to include the total enemy population that would result considering the alliance is formed. Thanks a lot for the tip.
Does anyone have any other suggestions for picking the "best" ally?
Also what are your ideas about silo placements? I hear lots of people saying that bunched silos do best, but my intuition says otherwise.
poptart911 wrote:Also what are your ideas about silo placements? I hear lots of people saying that bunched silos do best, but my intuition says otherwise.
For 1v1/2v2 "bunched" silos are a must or else they are going to be picked 1 by 1 and will not really protect anything. For 6-player game it's not always so, you might want to search the forum for a "Sui-silos" strategy when silos are placed spread but each maximaly close to 1 big enemy city like Leningrad (if you're Europe) giving you 99% chance to hit it first and score lots. But Sui-silos is about the only exeption of "cluster only!!!1111" rule for silos.
As for choosing an ally it's not that hard to enlist all possible cases, sort them best to worst manually and feed them to the bot. No need for any functions that way.
poptart911 wrote:I'm an intermediate player at and I never thought about that way. Currently the algorithm uses shared radar cover as a heuristic ( a function that estimates "goodness" ). So perhaps I need to take some more factors into consideration.
Just to understand your funtion:
There are three players playing EU, Africa and Russia. Your Bot is either Africa or Russia. Will your function make your Bot ally with Africa (or Russia)?
Because Africa and Russia can radar cover almost entire EU.
poptart911 wrote:Does anyone have any other suggestions for picking the "best" ally?
Generally, southern allies have the edge over northern allies. (SA and Africa vs NA and EU and so on).
poptart911 wrote:Also what are your ideas about silo placements? I hear lots of people saying that bunched silos do best, but my intuition says otherwise.
rus|Mike explained it very well, already. Maybe you should play some 1vs1 or 2vs2 with us, in order to "correct" your intuition.
BTW, did you read the "Gamma-Thread"?
- poptart911
- level1
- Posts: 33
- Joined: Thu Jan 13, 2011 6:04 pm
- Location: Iowa, US
- Contact:
Just to understand your funtion:
There are three players playing EU, Africa and Russia. Your Bot is either Africa or Russia. Will your function make your Bot ally with Africa (or Russia)?
Because Africa and Russia can radar cover almost entire EU.
Playing as EU, Africa and Russia tie, and the first one tested would win (Russia I think). Playing as either Russia or Africa, the bot would certainly pick EU.
All teams start with score 1.0. If they are not adjacent, score *= .75, if self or cpu, score = 0, also score *= (numberOfAllies -1). I'm starting to see how inadequate this formula is. I'm thinking I'll update it include a change in ratio between friendly and enemy populations and perhaps a N vs S check.
- poptart911
- level1
- Posts: 33
- Joined: Thu Jan 13, 2011 6:04 pm
- Location: Iowa, US
- Contact:
Who is online
Users browsing this forum: No registered users and 4 guests