Author Topic: Combat System and other things  (Read 10784 times)

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Combat System and other things
« Reply #15 on: July 27, 2007, 04:40:08 PM »
Quote from: Trafalgar
I'd rather not have aiming (at where the target will theoretically be in the future) be even more difficult than it is now.
Do you think the ability to do that should be cost free?
(abyaly) ->
[!--quoteo(post=0:date=' post=:name=)--][div class=\'quotetop\']QUOTE ( @ ' post=)[div class=\'quotemain\'][!--quotec--]it will be possible to at least guess at reality based on that information[/quote]
I would much rather that bots guessed at things for the main unless they spent a fair bit of energy working stuff out, it should all come down to a 'paper scissors stone' balance. This is an evolution game, even in the leagues, there shouldn't be one way to be the best...
« Last Edit: July 27, 2007, 04:41:52 PM by Jez »
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline vbraun

  • Bot Neophyte
  • *
  • Posts: 1
    • View Profile
Combat System and other things
« Reply #16 on: July 28, 2007, 08:45:17 PM »
Quote from: Numsgil
Ties are also streamlined.  Each bot gets one tie it can form (though unlimited ties can form to it from other bots).

This would make a multibot with more structure than a worm impossible, which is far from desirable. Maybe allow a bot to make more ties after the previous one hardens, with maybe a small upkeep for hardened ties?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Combat System and other things
« Reply #17 on: July 28, 2007, 10:35:47 PM »
Quote from: vbraun
Quote from: Numsgil
Ties are also streamlined.  Each bot gets one tie it can form (though unlimited ties can form to it from other bots).

This would make a multibot with more structure than a worm impossible, which is far from desirable. Maybe allow a bot to make more ties after the previous one hardens, with maybe a small upkeep for hardened ties?

I'm working on replacing ties-as-connective-devices with joints-- that is, simple weldings between bots.  The problem is that using ties to form structures puts alot of stress on the physics engine's design.

Offline Trafalgar

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Combat System and other things
« Reply #18 on: July 28, 2007, 11:25:16 PM »
Quote from: Jez
Quote from: Trafalgar
I'd rather not have aiming (at where the target will theoretically be in the future) be even more difficult than it is now.
Do you think the ability to do that should be cost free?

Actually, I think the F1 (and other competitions) ruleset should be changed to have (small) costs for math operators. The cost amount could be balanced to remove the energy advantage that SG bots have over bots which actually use conventional conditions, without making the cost so high as to make SG bots unfeasible.

I rather expect this would cripple Guardian, too, since it uses a ridiculous amount of math, and quite a bit of repetition of identical DNA, to avoid doing any unnecessary* stores.

*unnecessary meaning temporary variables. At the moment using temporary variables costs energy and saves CPU time. I went the opposite direction with the version of Guardian that's in the league - energy efficiency at the cost of CPU efficiency.

Although Guardian is capable of predicting positions in the future (with semi-decent reliability), if it is tied to anything, accuracy goes right out the window thanks to the tie physics. I'm not suggesting that 'get predicted position of bot after N cycles' should be a command, though. That'd take all the challenge out of trying to give a bot better shooting accuracy.

Also, I have been working on a more CPU-efficient version of Guardian (much shorter DNA length, due to replacing a lot of the duplicated DNA with stores to temporary variables), but haven't entered it in the league yet because it turns out that neither version of Guardian can currently beat Rabidus reliably (and the faster version gets stomped by Rabidus more reliably than the version currently in the league does). Rabidus, Etch, and Guardian seem to have a rock-paper-scissors thing going.

I've also been trying to work on some multi-bots, but have been having a great deal of trouble with ties - fixlen and fixang aren't working reliably for me. They're either bugged, or I haven't figured out how to use them properly. What little documentation there is (about fixlen and fixang) is more or less useless for actually figuring out how to use them, so it's a little hard to tell whether I'm feeding them the correct input (e.g. angle relative to the eye? or to the bot's aim? or to 0?), and whether they're behaving the way they're supposed to be.

I'm trying to use fixlen to move a parent and child bot a short distance away from each other after the child is born*, but it doesn't do anything to them unless I drag them apart manually (at which point they snap to the specified (fixlen) distance).

* = I'm replacing the tie and waiting for it to harden first. That's all going fine, fixlen and/or the tie length just aren't doing anything to the bots' positions until something moves one of the bots. I'll probably try making them thrust apart a little next, to see if that engages the snapping-into-place.

The aforementioned bot forms a pair, with each having an eye which looks everywhere except at the other bot in the pair. I've been trying to set them up such that when one bot in the pair sees another bot, it will rotate their tie to spin the bots so that both bots can see it. So far I can't get it to rotate them towards the target, but if I try to move one of the bots manually, they snap back into the same angle they were at before. So, fixang is definitely doing *something* - just not what I would like it to do. I've moved the target around them and confirmed that they are seeing it, but they still snap back to the same (wrong) angle.

Attempting to transfer coordinates over ties seems to be rather a pain in the ass, too (easier to just rotate the tie to spin the bots - or it would be, if it was working).

I haven't finished exhaustively testing everything to make sure fixang really is the problem, though, which is why I haven't posted a bug report on it yet (plus I prefer to know why something is doing what it is before I post a report).

As for bots having multiple ties, multi-bot internal communication is hampered significantly by the fact that you can only write one value through one tie per cycle, and if you want to read a value through a tie, you can also only read one per cycle (except for tref* vars). One thing that might help would be having tin1-tin5 which read from out1-5 on one tied bot (same bot that tref*/tmem* etc would work on).

Getting back to multiple ties, Guardian, for example, uses multiple ties in two situations:
1. If you are tied to another bot, and it is a friendly (or tiepres is 0), you can still tie to an enemy or veggie to kill or feed on them.
2. If you are tied to another bot, and it is a veggie, you can still tie to an enemy to kill them.

Being restricted to one self-made tie at a time would be rather a pain, since you would have to deltie your existing tie in order to make another, and you can't deltie a birth tie (so you would have to replace it with a regular one first). (Can you even delete a tie to one bot while tying to a different bot in the same cycle? I've determined that you can't send values through a tie on the same cycle that you form it, although the version of Guardian in the league tries anyways)
« Last Edit: July 28, 2007, 11:26:38 PM by Trafalgar »

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Combat System and other things
« Reply #19 on: July 29, 2007, 03:36:53 AM »
Quote from: Trafalgar
Actually, I think the F1 (and other competitions) ruleset should be changed to have (small) costs for math operators. The cost amount could be balanced to remove the energy advantage that SG bots have over bots which actually use conventional conditions, without making the cost so high as to make SG bots unfeasible.
That's a good idea, if SG bots still have an advantage when the next update is released I'll look into adding those costs.

I've never figured out how to use ties properly myself so good luck!
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline Trafalgar

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Combat System and other things
« Reply #20 on: July 29, 2007, 07:12:02 AM »
Ah ha. It doesn't wrap input angles, it caps them instead.

Quote
If .mem(468) <> 32000 And .Ties(k).Port = tn Then   'fixes tie angle
            If .mem(468) > 628 Then .mem(468) = -627
            If .mem(468) < -628 Then .mem(468) = 627
            .Ties(k).ang = .mem(468) / 200
            .Ties(k).angreg = True 'EricL 4/24/2006
End If

(So I have to wrap them myself to make sure they're within -627 to 627)

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Combat System and other things
« Reply #21 on: July 30, 2007, 03:36:08 AM »
Are you using aimdx/sx anywhere?(I did attempt to look myself, That thing's huge  ) They'll rotate the whole mb rather than a single bot. Setaim will only rotate that bot. For stretching/turning MBs tielen/tieang1-3 work alot better, but aren't as selective as fixang/tieang. Since you should only have one main tie to worry about, that shouldn't matter too much.

Quote
I've determined that you can't send values through a tie on the same cycle that you form it, although the version of Guardian in the league tries anyways)

That was to give other bots a chance at deleting the tie before being attacked through it. Not really all that useful since most bots randomize their tie numbers, to prevent enemies from remembering them.
« Last Edit: July 30, 2007, 03:59:08 AM by Endy »

Offline Trafalgar

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Combat System and other things
« Reply #22 on: July 30, 2007, 07:03:59 PM »
Quote from: Endy
Are you using aimdx/sx anywhere?

Hmm, no. IIRC, I just set them to 0 (when they aren't already 0, which is probably never if they're cleared before each cycle) in case something is screwing with them with info shots, ties, or venom. I'll have to try them sometime.

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
Combat System and other things
« Reply #23 on: August 02, 2007, 07:46:57 PM »
Quote from: Trafalgar
Actually, I think the F1 (and other competitions) ruleset should be changed to have (small) costs for math operators. The cost amount could be balanced to remove the energy advantage that SG bots have over bots which actually use conventional conditions, without making the cost so high as to make SG bots unfeasible.
I think a dna length cost would effectively neutralize any advantage to an SG bot without crippling them (except guardian and bucket). Just make it so that the cost of having a cond block is the same as the cost of working around it wrt number of operations.
Lancre operated on the feudal system, which was to say, everyone feuded all
the time and handed on the fight to their descendants.
        -- (Terry Pratchett, Carpe Jugulum)

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Combat System and other things
« Reply #24 on: March 06, 2008, 11:31:32 PM »
I've been working on a similar java version of DarwinBots (which is how I came to find out about it). Here's a few Ideas I thought would be worth contributing:
  • Cell Wall - a bot had a health rating, which was represented by the integrity of its cell wall. attack shots would simply digest the cell wall.
  • Hot spots - to represent a volcanic area, a map would have some hot spots. As hot spots generate ammonium, which helps amino acids to be produced, a bot would be able to build enzymes easily in hot spots, but the cell wall would disintegrate slowly.
  • A bot that has no cell wall bursts and releases all its energy in the form of proteins eg energy shots.
  • Toxins - although toxins wear off after time, they steadily inflict damage to the bot which happens to contain it. Each poison has an ID, and it can be used to create an antidote or expel it, no matter in which bot it's in.
  • Shells can be dumped in place to build a communal shell/fortress.
  • A bot without shell can destroy a bot with a weak cell wall, then use its shell as a home.

I hope these ideas are of some use.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Combat System and other things
« Reply #25 on: March 07, 2008, 10:57:43 AM »
Quote from: bacillus
I've been working on a similar java version of DarwinBots (which is how I came to find out about it).

Ooh, do tell.  I'd like to see something like that.

Quote
Cell Wall - a bot had a health rating, which was represented by the integrity of its cell wall. attack shots would simply digest the cell wall.

I played around a little with this idea, but I'm not sure how far to take it.  At present, I'm thinking that a bot's shell is directionally dependant like this, and when another bot tries to damage it they have to eat through just the shell in the vicinity that the shot hits in to tunnel through and damage the actual bot.

Quote
Hot spots - to represent a volcanic area, a map would have some hot spots. As hot spots generate ammonium, which helps amino acids to be produced, a bot would be able to build enzymes easily in hot spots, but the cell wall would disintegrate slowly.

Years ago I was playing with the idea of a black smoker.  A volcanic hot spot that spewed out useful and poisonous chemicals.  I might still play with it at some point, but it's not on my list for an initial release.

Quote
A bot that has no cell wall bursts and releases all its energy in the form of proteins eg energy shots.

At present I'm imagining making a bot turn in to an inert corpse when it dies, allowing the hunter to feed at its own pace.  But I think Eric might be working (or thought about working) on something like this for the current version.

Quote
Toxins - although toxins wear off after time, they steadily inflict damage to the bot which happens to contain it. Each poison has an ID, and I can be used to create an antidote or expel it, no matter in which bot it's in.

Quote
Shells can be dumped in place to build a communal shell/fortress.

I'm playing around conceptually with the idea of extracellular substances.  I'm not totally sure what the end result will look like, of course, but I think building a fortress will probably be possible.

Quote
A bot without shell can destroy a bot with a weak cell wall, then use its shell as a home.
I could see something like this.  I'm working towards having it be possible for a bot to live inside another bot.  Could just as easily allow a bot to live inside a corpse.

Quote
I hope these ideas are of some use.

Sure, I always appreciate brainstorming ideas.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Combat System and other things
« Reply #26 on: March 08, 2008, 10:57:14 PM »
I might still have a .jar lying round...
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Combat System and other things
« Reply #27 on: March 24, 2008, 06:38:29 PM »
Aaargh!

The UI is confounding, I still haven't made the bots distinguishable from shots.
My knowledge in I/O is minimal, so at the moment all I can run is my equivalent of Animal Minimalis. Here's the code:

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']rule "move forward"
   salience 30
when
   $bacterium:Bacterium(0==0)
then
   $bacterium.accelerate(1.0);
end

rule "feed"
   salience 10
when
   $bacterium:Bacterium(eye5>=50)
then
   $bacterium.feed(50);
end

rule "reproduce"
   salience 20
when
   $bacterium:Bacterium(energy>=5000)
then
   $bacterium.reproduce(50);
end

rule "turn left"
   salience 0
when
   $bacterium:Bacterium(eye3>eye5)
then
   $bacterium.turnLeft(20.0);
end

rule "turn right"
   salience -1
when
   $bacterium:Bacterium(eye7>eye5)
then
   $bacterium.turnRight(20.0);
end

you can see several similarities; the salience factor determines in which order the DNA is executed.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan