Author Topic: The root of much Tie evil in 2.4  (Read 6149 times)

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
The root of much Tie evil in 2.4
« on: May 07, 2006, 04:36:50 PM »
Prior to 2.42.4, stiffening a tie (and thus becoming a multibot) did not work.  The reason is that (as was the case with fixang and fixlen prior to 2.42.3) the code to listen to .stifftie (or stiffen ties over time) was simply never ported over from 2.37.6.  This of course, has been the root of all sorts of tie and multibot issues in 2.4.  If you can't stiffen a tie, you can't become a multibot (so I have learned) and lots of tie operations such as fixing tie angles and lengths depend on first being a multibot.

In 2.42.3, I (mistakenly) made it so that any bot with a tie instantly became a multibot without having to stiffen a tie first.  This combined with my porting the fixang code over allowed for certain tie operations like fixang and fixlen to start working for the first time but exposed some other issues.

I'm pretty sure the bug we see in 2.42.3b where impossibly long ties appear for a cycle and then disappear is a consequence of altzheimers writing a large value to .fixlen.   There was no parameter checking on .fixlen and thus becuase every bot with a tie was a multibot, for a cycle at least, a super long tie could be created and displayed before code earlier in the order of execution noticed and deleted the tie on the following cycle.  This was compounded by some underlying physics (having to do with natural tie length) which changed radically from 2.37.6 to 2.4.

I am making good progress on making all this work in 2.42.4, but I have some questions that stem both from my newbeness and from some physics changes between the versions.  I coudl take guesses and get them mostly right I think, but I have been bitten by going with my own assumptions in releases before, so my thanks in advance.  Answers to these will help me deliver the tie behaviour people expect.


Ties stiffen over time even without the bot writing to .stifftie?  How long should this take?  (I assume 20 cycles.)  Should this be progressive (I.e. should a tie be stiffer after 20 cycles then it is after 10?)  To what ultimate stiffness?  As stiff as possible?

Is stiffening a tie the only way to become a multibot?  I assume so.  If a bot does noto explicitly stiffen a tie, but it just becomes stiff over time, does it become a multibot?  I assume so, but when? After 20 cycles?

Should the birth tie stiffen over time as well?  I assume not.

Should the explicit operation of stiffening a tie to any value, even making it super springy, make the bot a multibot right then?  I assume so.  Should the bot be able to make a stiff tie more springy via .stifftie?  I assume so.

What is the maximum length of a tie beyond which the code should delete it? (Right now it is 1000)  Can the bot set a tie to be this length or only a more limited length?  (Right now, bots can only set tie lengths from 0 to 200).  What should setting a tie to length 0 mean?  What should the code do if negative tie lengths are attempted (say by altzheimers)? (Right now in 2.42.4 they equate to 0 and lengths exceeding 200 equate to 200.)

How strong should ties be?  Should bots be able to break ties via acceleration or centrifical force or collisions?  What about in the case where the bot has a high mass?  Right now they can.

Thanks in advance for your answers.
« Last Edit: May 07, 2006, 05:08:32 PM by EricL »
Many beers....

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
The root of much Tie evil in 2.4
« Reply #1 on: May 07, 2006, 06:15:47 PM »
Quote
I'm pretty sure the bug we see in 2.42.3b where impossibly long ties appear for a cycle and then disappear is a consequence of altzheimers writing a large value to .fixlen.

Sorry but I don't buy that. I am seeing very young bots do this and do it a LOT. I also see it with the waste threshold at different levels including completely off.
In a fairly large sim with a few hundred bots on screen, one of these ties gets fired about once every 2-5 cycles. That is way to often for random altzheimers.
Also fixlen doesn't actually create a tie. The only way to do that is to store a value directly into .tie

Quote
Ties stiffen over time even without the bot writing to .stifftie? How long should this take? (I assume 20 cycles.) Should this be progressive (I.e. should a tie be stiffer after 20 cycles then it is after 10?) To what ultimate stiffness? As stiff as possible?
I think you may have the wrong idea of .stifftie
Ties become hardened when the variable called "last" counts down to zero. this takes 20 cycles from the inception of the tie. At this point, .multi is set to 1. They do not harden gradually but do it all at once when last is equal to zero.
Stifftie is a very recent addition to the sysvars. I added it about a year ago to improve the control over the rigidity of already stiffened ties. It does absolutely nothing unless .multi is already true.

Quote
Is stiffening a tie the only way to become a multibot?
Yup, you got it. Actually though, the ties becoming hardened is a byproduct of becoming a multi-bot, not the other way around.

Quote
Should the birth tie stiffen over time as well? I assume not.
It never has. It is debatable whether it should though. I still vote no I think though if you like you could add an option in the control panel to choose.

Quote
Should the explicit operation of stiffening a tie to any value, even making it super springy, make the bot a multibot right then?
Nope, oz you can't activate stifftie until .multi is true. Same goes for tielen, tieang and all the others. .multi is the key that turns them all on or off.

Quote
Should the bot be able to make a stiff tie more springy via .stifftie? I assume so.
That's what it was designed to do. To be quite honest though I never really got it working as well as I had hoped.

Quote
What is the maximum length of a tie beyond which the code should delete it? (Right now it is 1000)
The 1000 limit seems fine to me. I'm not married to that value though

Quote
Can the bot set a tie to be this length or only a more limited length? (Right now, bots can only set tie lengths from 0 to 200).
Only in 2.4 dude.
In ALL other versions you can set it to any length that you like. Setting 10,000 is a good way to break a tie and get a good shove off at the same time.

Quote
What should setting a tie to length 0 mean?
It means that the tie wants to be zero length which would attempt to superimpose the robots on top of each other. In reality, setting this will leave you with an equilibrium distance where the tie springiness is exactly counteracted by the inter robot repulsion field.

Quote
What should the code do if negative tie lengths are attempted (say by altzheimers)? (Right now in 2.42.4 they equate to 0 and lengths exceeding 200 equate to 200.)
Never really considered this. How about treating negatives as positive by just using the magnitude of the value?

Quote
How strong should ties be? Should bots be able to break ties via acceleration or centrifical force or collisions? What about in the case where the bot has a high mass? Right now they can.
I would say that a tie should always be stronger than a robot's acceleration. they should not be able to pull apart under their own power.


HMMMMM?????

That's weird. Quotes aren't working correctly in this forum  
« Last Edit: May 07, 2006, 06:19:50 PM by PurpleYouko »
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
The root of much Tie evil in 2.4
« Reply #2 on: May 07, 2006, 06:49:35 PM »
Glad I asked...

It would make sense that young bots are the ones with the super long ties cause the birth tie makes them multi in that version (remember, I messed it up).  It also explains why we didn't see this until I turned multi on but admitable I'm theorizing.  If you are seeing it with waste off, then there is somethign else going on.  I'll look into it as soon as I get a chance.

In 2.4, it appears the "last" variable passed to maketie is used solely to autodelete the birth tie after 100 cycles.  As I mention, the functionality to stiffen ties after 20 cycles in 2.4 appears not to exist.  It appears the physics were changed to such an extent, including the whole concept of "stiffness" in ties, that this appears to just never had been put back in.

So let me get this straight.  With the exception of the birth tie, if a bot is tied to another bot for 20 cycles, that makes him a multibot and the tie should instintly stiffen and stay that way until he decides to change the stiffness via .stifftie.  Does he stay a multibot from that point forward as long as he has any tie at all?  That is, multi is not tie specific.  What if the original tie that made him multi goes away but he has other, younger ties?  Can he use stifftie or fixang or fixlen on a new tie that is younger than 20 cycles if he has multi status?
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
The root of much Tie evil in 2.4
« Reply #3 on: May 07, 2006, 06:56:44 PM »
I think alot of this is my fault.  Ties were prime candidates for my "make it better" approach to physics.  Unfortunately, while they are "smoother" than their 2.37 counterparts, that smoothness came at a cost that is becoming difficult to pay...

The issue still isn't fully resolved.  I'm thinking of replacing springy ties altogether in 2.5 and using rigid ties only.  I dunno...

I'm not entirely without bias in 2.4's ties.  I never really used ties in any version, which is why they're the first things I broke and seem to be the last things I fix.  Eventually I'm hoping they'll be working right enough that I can make my squid bot like I wanted to a year ago.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
The root of much Tie evil in 2.4
« Reply #4 on: May 07, 2006, 07:38:06 PM »
I think it whould look most realistic with very short ties, so a multibot looks like a little colony of bots rather then a spiderweb of ties.  
The internet is corrupt and controlled by criminally minded people.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
The root of much Tie evil in 2.4
« Reply #5 on: May 08, 2006, 09:33:47 AM »
Quote
Can he use stifftie or fixang or fixlen on a new tie that is younger than 20 cycles if he has multi status?

Big fat NO on that one. There still needs to be a class of temporary ties that can be used for feeding or information transfer, that do not count towards the MB'ness of the MB. Many of the MBs that we now have, employ tie feeding.
Allowing the use of MB controls on any new tie would be to give way too much power to the MB.

Imagine a large MB that gets attacked by a combination shot, tie feeder (like HDV4) . It could find the tie phase of the attaker in the first round then set the attacker's tieang1 to make it face away. Then it could (in the same cycle) set the tielen of the tie to about 32000 and throw the attacker away with a rather large force.

Not good.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Light

  • Bot Destroyer
  • ***
  • Posts: 245
    • View Profile
The root of much Tie evil in 2.4
« Reply #6 on: May 08, 2006, 09:38:32 AM »
hmm that sounds quite cool but yeah not a good idea