Author Topic: Bugs in 2.42.8f  (Read 6945 times)

Offline Henk

  • Bot Destroyer
  • ***
  • Posts: 110
    • View Profile
Bugs in 2.42.8f
« on: November 07, 2006, 10:14:16 AM »
I have ties to nothing in 2.42.8f, see attached sims
cond
*.DBbugs 0 =
start
.rejoice inc
stop

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Bugs in 2.42.8f
« Reply #1 on: November 07, 2006, 11:18:34 AM »
So, how does that old saying go?  It's not a bug, it's a feature!!!!!!!

Indeed, beleive it or not, this is actually a feature.  In recent buddy drops I added this thing I call 'Movemenct Vectors' designed to help you see what the bot (or a bunch of bots all at once) is actually doing to move itself.  What I do is display lines coming out of the edge of the bot for each of the four movement sysvars (.up, ,dn, .sx. .dx).  The length of the lines are proportional to the value the bot stored into the respective sysvar that cycle and surprise surprise, they look exactly like a tie to nowhere!  The line is the same color as the bot and there can be up to four of them at once, pointing in the four bot-relative movement directions, in the case where the bot stored values into all the four sysvars that cycle.

Note that if the bot stores a negative number into a movement sysvar, the line will point the other way.  You can tell, for example, the difference between a bot storing 10 into .up or one storing -10 into .dn by where the line starts.  The resulting movement of the bot will be the same in both cases, but in the first case the line will start at the forward edge of the bot and in the latter case, it will start from the back edge and go through the bot.

You can turn the 'feature' off via a menu item on the Robots menu.

Thanks for the bug report.  I do appreciate it.
Many beers....

Offline Henk

  • Bot Destroyer
  • ***
  • Posts: 110
    • View Profile
Bugs in 2.42.8f
« Reply #2 on: November 07, 2006, 11:33:34 AM »
Hmmm, are you sure that's what this is? Those 'movement vectors' were awfully big.

It's a monster I tell you, a monster!    

So just to get things straight, this is a movement vector?
cond
*.DBbugs 0 =
start
.rejoice inc
stop

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Bugs in 2.42.8f
« Reply #3 on: November 07, 2006, 11:40:53 AM »
Pretty sure.  I made them big so you can see them, I think 10x the sysvar value up to 100.  The bot is likely storing a large number into .up.   Turn them off and see if they go away.  You can also use the movement sysvar button on the bot console dialog to verify the bot behaviour and verify that the lines corrospond to what the bot is doing.

If people have ideas on how to improve the feature, happy to hear them.  My goal here is to provide more graphical visablity into bot behaviour, particularly behaviour of evolved bots with complex DNA, but everything like this I do can be turned off for those who don't like the way something looks or acts.
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Bugs in 2.42.8f
« Reply #4 on: November 07, 2006, 03:29:46 PM »
A little arrow hat, like a >, would go a long way to telling people that they're vectors.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Bugs in 2.42.8f
« Reply #5 on: November 07, 2006, 03:35:52 PM »
Quote from: Numsgil
A little arrow hat, like a >, would go a long way to telling people that they're vectors.
I thought of that, but didn't want to take the perf hit.  If people find they only use this for debugging, then I'd be happy to add it.
Many beers....

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Bugs in 2.42.8f
« Reply #6 on: November 08, 2006, 11:43:29 AM »
This is definitely a bug:

I have birth ties that NEVER snap, even when stretched. It might be something to do with a bot having a birth tie as it goes into a teleporter.

Check out the clump of vegs in the top right hand corner. Not only are they tied to vegs on the other side of the field, they are all tied together by unbreakable, infinite birth ties

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Bugs in 2.42.8f
« Reply #7 on: November 08, 2006, 12:24:39 PM »
Pretty sure this is the same bug as described here.  The Intrasim teleporter is moving fixed veggies around and 2.42.7f does not check for tie length viloations for fixed veggies.

I have released 2.42.7g so that people can verify that the tie problems they have expereiced are addressed before I release an "official" 2.42.9.
Many beers....

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Bugs in 2.42.8f
« Reply #8 on: November 09, 2006, 11:03:30 AM »
OK, that's fixed it

However I've just noticed .fixang isn't working properly. Try loading the bot I've attached () underneath and placing a veggy in front of it. It will tie to the veggie, and when the tie becomes hardened, should swing round so the veg is behind it.

But the tie just locks at either 90 or 270 degrees.
« Last Edit: November 09, 2006, 11:17:38 AM by Elite »

Offline kenstauffer

  • Bot Neophyte
  • *
  • Posts: 12
    • View Profile
Bugs in 2.42.8f
« Reply #9 on: November 09, 2006, 11:11:33 AM »
Quote from: Elite
OK, that's fixed it

However I've just noticed .fixang isn't working properly. Try loading the bot I've attacked underneath and placing a veggy in front of it. It will tie to the veggie, and when the tie becomes hardened, should swing round so the veg is behind it.

But the tie just locks at either 90 or 270 degrees.
I'm informing PETB, and telling them of your inhumane abuse towards bots

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Bugs in 2.42.8f
« Reply #10 on: November 09, 2006, 12:39:38 PM »
Quote from: Elite
However I've just noticed .fixang isn't working properly.

The code is working correctly.  It is your bot that is incorrect.  It is recreating the tie every cycle, thus the tie never hardens, the bot never becomes a multibot and .fixang never works.  Try this:

cond
*.numties 0 =
start
1 .tie store
1 .tienum store
stop

cond
start
628 .fixang store
stop
Many beers....

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Bugs in 2.42.8f
« Reply #11 on: November 09, 2006, 02:23:06 PM »
Oh yeah, whoops  

But the bug is still there though. Try 'rotate' and it does exactly the same thing. It ties to a veg, and then locks at 90 degrees either side of it's eye

When a 'rotate' ties to another 'rotate', .fixang works correctly, but when a veg is involved it goes weird.

I noticed it when trialing the bot attached below. It will grab a veg placed in front of it, unfix it, fix the tie angle to 180 degrees, and drain 80% of it's energy continually.

Other than that though, ties are working great. I was amazed at how well my batterybots were doing. Last time I tested them they limped along barely surviving to grab a veg, now they speed around wiping the floor with everything else in the sim (although with their vegs at funny angles)

Even Hexagonis does reasonably well (it can't make it's hexagon shape very well only because it's optimised for the different tie physics of 2.37.6)
« Last Edit: November 09, 2006, 02:23:36 PM by Elite »

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Bugs in 2.42.8f
« Reply #12 on: November 09, 2006, 02:37:48 PM »
Okay, I think I found this.  It's a bug although I don't think it was introduced recently.  I still need to look into it some more.  I'm not happy with the whole area of forces due to tie operations including angular momentum but what I think is happening is that TieTorque() was not resetting the angle request flag used for bot .fixang requests and the result was that a harmonic was created for requests of exactly PI (and perhaps other angles) because of interaction between the endless angle requests and the code that adjusts the .aim vector to simulate the angular momentum caused by the tie angle change.  I have it working correctly now, but it's super complex and I need to experiment some more to make sure it's the right fix.

I really should walk through this whole area at some point but I will work on a fix and drop another buddy tonight or tomorrow for you to test.
« Last Edit: November 09, 2006, 05:35:30 PM by EricL »
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Bugs in 2.42.8f
« Reply #13 on: November 09, 2006, 10:41:51 PM »
Alot of the problem is the sheer complexity of ties.  They're sort of springs, rods, and joints (where they connect to bots) all in one.

You get an idea of how complex they are when you try to describe what they are and how they work to someone who doesn't know about them.

All those different properties make ties a huge headache to maintain in code and very fragile to change.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Bugs in 2.42.8f
« Reply #14 on: November 10, 2006, 02:16:50 AM »
Wow.  Okay, I think I have found and fixed a huge bug having to do with hardened ties and transfer of angular momentum.  Bascially, there was no angular momentum being transferred to bots through ties from  operations including .fixang but also due to plain old movements, collisions, etc. because the changes to .aim made in TieTorque() were being overwritten by another routine later in the cycle.   This is a huge, huge bug and should result in much improved tie behaviour.  Very nice find Elite.  This is huge and it's been there a while.  It may be one of the reasons tie physics seem so different in 2.4 v. 2.37.  This still may need some work, but hopefully, things are much better now.

Try the buddy with your favorite tie bots and let me know what you think.

2.42.8h Buddy Drop Download
Many beers....