Re: Contest 2 Update:

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Tue, 30 Nov 2004 14:01:35 -0800, cklester <guest at rapideuphoria.com> wrote:
> Yeah, I have code for that already. I was just wondering if you could
> develop/extend the EuBots API, although since each bot is a separate
> running program, there really shouldn't be shared code. I remember back
> long ago when the bots were going to be include files, not actual running
> programs (in contests of yore). Just a different paradigm, that's all. :)

There are a *lot* of advantages to be had by separating the 'bots'
into their own process...
-You don't have to change lots of source code every time you add a new bot.
-You don't have to shut down the arena program when a new bot is added.
-There's no way for bots to interfere with each other, at least not
the way I've done it.
-MOST IMPORTANTLY: If a bot crashes, it doesn't take down the arena.

> I also tend to think about it in an object-oriented paradigm.
> 
> s = arena.size()
> e = arena.adjacentEnemies(Self) <-- a function of the arena
> e = Self.scanForEnemies() <-- a function of the bot

That's not supported by the language. smile

> Is it up to the arena to provide location details? The game engine (which
> is not just the arena)? The bots? I tend to want to avoid duplication of
> data, and what I'm doing now is storing the arena in a variable when I
> could just be asking the engine for that data.

I've made changes to the code rules... arena, metrics, units are no
longer passed as parameters, they're available as persistent global
variables.
I've also changed the format of storage in the arena. An square in the
arena containing a unit is of the unique value unit_handle, where
units[unit_value] contains information about that unit, including
position, owner, and whether the unit's last move succeeded or not.
(more properties may be added if desired)

Argh! Still working on the framework. Sorry guys.
(Rules and framework will be frozen when the contest starts. That may
not be Dec 1.)
-- 
MrTrick

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu