Page 1 of 5

Codename: Gamma

Posted: Tue Jan 12, 2010 4:33 pm
by Ace Rimmer
Γ

Goal #1: Complete! Figure out where in the world to start. That is, which language should I try and tackle.
Goal #2: Complete! Lua, that's the one. Now, to figure out what in the world I'm doing. Actually, to figure out the simple tasks, like placement.
Goal #3: Complete! Now that I can place units, determine which territories are involved, and even make units switch states/perform actions, I need to figure out how to properly reference specific units. Damn that infernal 'attempt to index ('51') a nill value' error! How can 51 be a nill value?!

Goal #4 : Learn how to get fleet to react to situations. As of this moment, I can place all units (ground and naval) and move units, but only statically, not dynamically. That is, place ship at x/y, move ship to x/y. I need to be able to see enemy ships/ground units (like Radar) and approach/avoid as necessary.
Goal #5: Learn how to launch appropriate planes and move them dynamically.
Goal #6: Learn to use the OnEvent() function to launch silos.

Help #1: Complete! I need a name for this Bot, and being the creatively handicapped person I am, I look to you for suggestions.

Helpful Tips:
  1. BM's (nukes) will inflict damage to a radius of 1.8 from ground zero.
  2. Minimum placement distance for ground units is 3.6 (radius from center of existing unit).
  3. GetAllUnits() does not gather information about enemy silos that are only visible because they have launched. I.e., silos that have not been seen by radar.
  4. OnEvent (eventtype, sourceID, targetID, unittype, longitude, latitude) =
    1. eventtype: see the DEFCON AI Luabot Reference for eventtypes
    2. sourceID: The ID of the gunshot or missile if eventtype is Destroyed or Hit. ID of the unit causing the eventtype
    3. targetID: ID of the unit getting Destroyed or Hit.
    4. unittype: Not sure about this, only prints 'Invalid'. For units, I just use targetID:GetUnitType().
    5. longitude: x coordinates of eventtype location. E.g., the spot your carrier, Silo, etc dies.
    6. latitude: y coordinates of eventtype location


Alright boys and girls, I'm going to try my hand at making a Defcon Bot. I have zero coding skills (well, slightly above zero, negligible at best) but loads of willingness to attempt to learn whatever is needed to create a Bot to crush it's human and perhaps fellow Bot opponents.

I keep waiting and waiting for something to appear Bot-wise, and have been surprisingly disappointed. Of necessity, I'll make this a public work log and solicit your help where needed. Read that as, "you that have real coding skills".

Once this bot is functional, I'll try to work out some way to host a Bot enabled server for those interested to test out it's skills. I do not anticipate having anything functional for quiet some time, but promise to provide a Bot of Bots.

Let the (Defcon) world tremble in fear. :twisted:

Posted: Tue Jan 12, 2010 4:44 pm
by Montyphy
I'd be happy to help where possible. Been wanting to work on one but the one I had in mind requires quite a lot of research and development.

As for a name, Γ is nice and geeky.

Posted: Tue Jan 12, 2010 8:05 pm
by DTNC Vicious
[ a Bot to crush it's human and perhaps fellow Bot opponents. ]

Now that would be a interesting tourney :D

Posted: Tue Jan 12, 2010 9:49 pm
by Schubdüse
Brainstorming:

HalBot (Heuristically programmed ALgorithmic Bot)

N00Bot

Bot-terbrot :lol:

ρ-Bot

(BOT)"Bots birthday"

bot|Mike

Motor-Bot

U-Bot (a U-Boot is a submarine) :lol:


"insert names of your kids here"_2.0

Rimmerstein

Posted: Wed Jan 13, 2010 1:15 am
by Why?
Schubdüse wrote:(BOT)"Bots birthday"

bot|Mike

Rimmerstein


lol


Bot?

Posted: Wed Jan 13, 2010 1:34 pm
by Blackbeard
Being able to code the thing so that it can (at Defcon 3) launch all initial Carrier fighters, ping all (combat) Subs, and prepare to launch all Carrier Bombers (leaving a few carriers to sweep of coirse :) ) simultaneously would make it a pretty tough naval opponent.

Also, if it could triangulate your silo positons from perfunctory data, then you would always be in fear of a pre-emptive attack on your silos.

...And if its own Silo (and Bomber nukes) launches were always made up of perfect missile packs, then it would get maximum kills every time.

Edit: Lol, just posted that ^ without reading some of the other Topics here. /me goes to have a good read :roll: .

Posted: Wed Jan 13, 2010 3:14 pm
by martin
Rimmermatic 1000

I'll be happy to help wherever I can, I really want to make a defcon bot I just never quite get the time :(

Have you considered hosting the source code on an svn (code.google.com is free, for example) - other people can get hold of it easily then. And you can add teammembers to your SVN and they can commit changes etc.

Posted: Wed Jan 13, 2010 3:42 pm
by Ace Rimmer
martin wrote:I'll be happy to help wherever I can, I really want to make a defcon bot I just never quite get the time :(

Have you considered hosting the source code on an svn (code.google.com is free, for example) - other people can get hold of it easily then. And you can add teammembers to your SVN and they can commit changes etc.

I did not think about that, but of course will, when I get to a point that it's worth posting. :P

Posted: Wed Jan 13, 2010 5:20 pm
by (MOR)
Schubdüse wrote:(BOT)"Bots birthday"



You will suffer



What about "Level'6" ?

Posted: Thu Jan 14, 2010 11:16 pm
by iRadiated
One piece of essential code:

if ident='MOR' then
min_speed = 5
end if

Posted: Thu Jan 14, 2010 11:35 pm
by Ace Rimmer
iRadiated wrote:One piece of essential code:

if ident='MOR' then
min_speed = 5
end if

Hehe, naah. I want to give (MOR) the best opportunity to "beat himself". :P

Posted: Fri Jan 15, 2010 12:05 am
by trickser
I can think of some nasty, "unhuman" tricks like: power turns for bombers and ships. Always returning fighters to ships/base. Counting ships/planes and if number is low enough just hold the timer and hunt them. Would be no fun to play. But kinda useful for the unbeatable approach.

Posted: Mon Jan 18, 2010 6:03 am
by Ace Rimmer
Interesting thoughts.

Just an update, I've gone with Lua, and have figured out some of the basics (you might have seen the Bot server online). Now, I just need to actually learn how to use the code/functions and get the Bot to place fleet. Thanks to Robin's whiteboard functions, I have some interesting new ideas

I've got a tutorial on C++ and Lua; will be starting there. Not sure how long it's going to take me to get the Bot into action, but at least I'm movin'!

Posted: Mon Jan 18, 2010 11:03 pm
by martin
I still have a copy of the old lua code for Joshua around somewhere, would you like a copy to get you started? It's really shitty code but it's a start.

Posted: Tue Jan 19, 2010 1:17 am
by Ace Rimmer
Yes, I'm sure that would help quiet a bit. :D