Author Topic: Hive coding  (Read 9592 times)

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Hive coding
« Reply #15 on: January 30, 2006, 12:49:51 PM »
What are you talking about  :blink:

I'm not calculating in the condition - *.ties is a custom variable.

I store *.numties into .ties if the number of ties > *.ties
And break all ties if *.numties < *.ties

Meaning that as soon as the number of ties decreases the bot severs all ties

PS: Made an error in the code - it should be:

Code: [Select]
*.numties .ties store
not
Code: [Select]
*.numties *.ties store
« Last Edit: January 30, 2006, 12:59:05 PM by Elite »

Offline Ulciscor

  • Bot Destroyer
  • ***
  • Posts: 401
    • View Profile
Hive coding
« Reply #16 on: January 30, 2006, 01:05:29 PM »
Ahh very clever. Much simpler than what I was thinking, needing to send info and then delete ties; instead using the tie deletion as the wakeup signal. Awesome! :D

Apart from mundane problems this seems like a cool idea. (Mundane being bots dying, decreasing the tie count and waking up all the hibernated wraiths, for example)
:D Ulciscor :D

I used to be indecisive, but now I'm not so sure.

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Hive coding
« Reply #17 on: January 30, 2006, 01:19:51 PM »
Bots dying:

A problem but not too unmanageable (if that's even a word). If a bot dies then there should be a good reason for it, and the hive should be woken to check if everything's OK. Bots die of natural causes anyway (pwaste) so there might be a few 'false alarms'. Might have them get the opinion of a Keeper before going on a feeding frenzy.
If the hive is being attacked and bots are dying then the hive should be woken up anyway  :D

You make a great devil's advocate Ulciscor  :evil:
Good for making sure that everything's completely foolproof  B)
« Last Edit: January 30, 2006, 01:20:46 PM by Elite »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hive coding
« Reply #18 on: January 30, 2006, 01:32:18 PM »
Quote
Quote
cond
*.numties *.ties >
*.hibernate 1 =
start
*.numties *.ties store
stop

' If the number of ties is decreasing then delete all ties

cond
*.numties *.ties <
*.hibernate 1 =
start
*.tiepres .deltie store
stop

This won't work. At least not in 2.36 or earlier.
You CANNOT perform calculations of any type in the condition step of the gene.

Num may have incorporated this ability into 2.4. Not sure though.
Yes, that's exactly what I did.

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Hive coding
« Reply #19 on: January 30, 2006, 04:17:40 PM »
Physics in 2.4 seem entirely different too - my bots just seem to slide everywhere and tie to random things for some reason  :wacko:
Maybe it's just me  :D
Sizes have changed - you can get nearly invisibly tiny bots

Anyone have any comments on *.numties method
« Last Edit: January 30, 2006, 04:21:45 PM by Elite »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hive coding
« Reply #20 on: January 30, 2006, 08:09:35 PM »
Yep, physics in 2.4 is entirely different.  Pre 2.4 physics is a mess to maintain and edit.

And the physics in the version I'm working on now will be a little different too :D

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Hive coding
« Reply #21 on: January 31, 2006, 09:06:02 AM »
Quote
I'm not calculating in the condition - *.ties is a custom variable.

You are absolutely right. I think my brain is fried  :wacko:

too much working does that to you.  <_<
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Hive coding
« Reply #22 on: January 31, 2006, 02:23:21 PM »
Anyone have any suggestions on how to get the bots to hibernate - I was (and still am) thinking that the Keepers should use out/in

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hive coding
« Reply #23 on: January 31, 2006, 04:59:17 PM »
I think info shots would work best.  Have the keepers shoot values into a certain 'wake up' location.

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Hive coding
« Reply #24 on: February 01, 2006, 11:10:55 AM »
I mean for making the bots hibernate in the first place - not waking them up

But for that we can either use:

- Ties via *.numties

- Info shots (wake up bots who wake up more bots etc.)

Undecided  :unsure:

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hive coding
« Reply #25 on: February 01, 2006, 01:59:00 PM »
The most obvious solution is to add a *.hibernate 0 = condition to every gene.

Not very elegant though.

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Hive coding
« Reply #26 on: February 01, 2006, 04:12:20 PM »
Probably should have clarified some more: to make the bots go into hibernation/making them go to sleep/tell them when to hibernate

 :D

Problem with that solution is that the bots will expend nrg while hibernating. If I wanted to make lots of work for myself I could turn whatever emerges into a SG bot  :P
- It will be made less of a problem by the reduced costs however - just get them to stock up on nrg before they hibernate