Author Topic: Hello, I'am new and I've got a virus question.  (Read 10736 times)

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #15 on: June 28, 2007, 04:28:48 PM »
I don't see anything wrong with what you are seeing in the code. Are you letting the ties harden first? That would cause a problem. Perhaps Nums will spot something when he looks again, he's much better at the maths bit than I am.  
Post the code you are working on if you can't figure it out still and I'll have another look, it's often easier when you can see the whole bot and what it's doing.

Sometimes there are problems posting here, not very often though, I think it's just the Invision forums getting too busy, at least that's the message I got when I tried to post something earlier!  
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 Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #16 on: June 28, 2007, 05:18:31 PM »
Well you asked for the code here you get it.

' reproducing while in singe form

cond
*.numties 0 =
*.robage 0 !=
start
7 42 store
50 .repro store
'1.readtie store
stop

' repro second
'cond
'*.numties 1 =
'*.robage 0 !=
'stop
'50 .repro store               'not used jet
'stop

' Child connect to mother
cond
*.robage 0 =
start
.tie inc
stop

' sharing energie in organism
cond
*.numties 1 =
start
1 .tienum store
314 1 *42 mult 1 add mult .fixang store 'both siding desame direction.
50 .sharenrg store
stop


' body strengthening

cond
*.nrg 2000 >
start
100 .strbody store
stop

'waste desposal

cond
*.waste 10 >
start
*.waste .shootval store
-4 .shoot store
stop


Can you now tell what's wrong?
Oh my god, who the hell cares.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #17 on: June 28, 2007, 10:46:47 PM »
Quote from: Peter
It is not working with me. And what am I exactly seeing wrong in the code


314 ((2 *42 mult) 1 add) mult

314*((2*1)+1)=942
314*((2*0)+1)=314

This is what I am seeing in my code.


314 ((-1 *42 mult) 1 add) mult

314*((-1*1)+1)=0
314*((-1*0)+1)=314

This is what I am seeing in your posted code.

What am I seeing wrong.

Practical they're doing desame in the simulation. How does this work.  

In fact I posted this twice, the first time it got stuck, is this happening more often.

Yeah. you're right.  Guess I haven't been programming bots enough lately.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #18 on: June 29, 2007, 04:38:23 AM »
fixang always seems to be set to 32000, at least according to the console
(select and rclick on bot and open console, type '? .fixang' in console
without quotation marks and it will return the value).
Why fixang is remaining at 32000 and not being changed when you enter a new
value is a mystery.

This raises the question of why your bot is turning at all and why, when they do turn, they are
not turning by the same amount.
Although in fact your bot is only setting its direction after about 30 turns,
by which time the ties should be hardened anyway and it shouldn't be able to
turn.

I have just checked this against Dimacheri(MB)(Shen) and it is suffering from
similar problems.I think the reason that bot works and manages to change the
angle of its ties is simply because it moves.

I suggest we wait and see what Nums has to say about the problem, if it's a
really easy problem to find and fix then we could be lucky, otherwise we'll
just have to be patient.

The only mistake I noticed in your code btw was *42 was either 0 or 7 but that would have just meant your bot should have turned 3.75 rotations instead of .75 of a rotation!
« Last Edit: June 29, 2007, 04:39:39 AM 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 Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #19 on: June 29, 2007, 07:50:13 AM »
How is the 7 coming there. , strangely enough it's doing as one, that's a coinfidence.

So, I gues there's a mistake in the code, maybe there's one of the reasons multibots doesn't work well. But a well now I've got to wait onto the fixing, allrigth.

Another question, this time not about bots, but I feel I've got to keep asking questions .

I gues I have'nt logged out yesterday, are you not automatic logged out, I was still logged in when I came here back. The question if it wasn't clear.

Are you here automatic logged out or do you stay in until you log out, how does it exactly work in here.


(I know almost for sure I have broken a record of asking question's in row in here, I hope you don't mind )
Oh my god, who the hell cares.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #20 on: June 29, 2007, 11:14:49 AM »
No probs with asking lots of questions!!

The forum remembers you and your password for you until you log out. If you log out then next time you visit you'll have to enter your name and password again.
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 Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #21 on: June 29, 2007, 02:02:07 PM »
Allright if it's not a problem here is another. The 'permanent' ties in multibots, are they supposed to be permanent. They are in fact not permanent in my simulation.

Is this code in a modefied bot like the one  posted earlier, I am sure it will do desame in the posted bot.
Quote
cond
*.numties 1 =
*.multi 1 = and
'0 *43 = and
start
1 .tienum store
628 .fixang store      
50 .sharenrg store
'1 43 store
stop

This is a permanent (yellow) tie.



Quote
cond
*.numties 1 =
*.multi 1 = and
0 *43 = and
start
1 .tienum store
628 .fixang store      
50 .sharenrg store
1 43 store
stop

Here you have a not-permanent (red) tie. (it's one cycle yellow)
« Last Edit: June 29, 2007, 02:02:47 PM by Peter »
Oh my god, who the hell cares.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #22 on: June 29, 2007, 02:45:23 PM »
To be honest, this is a bit out of my ken.  Eric primarily was the one who set up the ties after I broke them in 2.40.  You might want to try looking at his change logs in the bugs and fixes forum, and searching for fixang.  Try checking out this post.

Also try your bot out in 2.37 and see if there's a difference.  That'll give us a clue as to wether it's the bot or the program.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #23 on: June 29, 2007, 04:15:58 PM »
Well I found this in

2.42.9c Buddy Drop Download 18)

Quote
Bots should still be able to fix the angle of a tie they did not create by explicitly using .fixang.

This is the only sentence I found that was going about fixang. Nothing about becoming a permanent tie or something like it.

It did desame in 2.37.6 so I gues it's normal. I was just guesing that a permanent tie supposed to be permanent. So it is'nt.
Oh my god, who the hell cares.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #24 on: June 29, 2007, 04:54:28 PM »
Nums;

Tried Peters bot in 2.37.6 - 2.37.7b and 2.37.7g but the bot crashed them all.

Triangulus in 3.27.6 and 2.37.g manages to form triangle but fails to in 2.43 (and 2.42.7 the earliest 2.42 .exe I have)

fixang still reads 32000 in 3.27.6 though so that is probably not be the problem.

Are there other tests I can try for you or anything I can do to help narrow down what is causing this? I'm not really a MB person anyway so not sure how to progress further in finding problem.

Peter, what do you mean "I was just guesing that a permanent tie supposed to be permanent. So it is'nt."?

A permanent tie is formed after a set number of turns, after that you shouldn't be able to change its position using .fixang, however you can still use .tieang
(tieang   ----- Ties harden after a while. Whatever angle and length that they have at that point becomes permanent. .tiang lets me temporarily bend the angle by the value that I store. It springs back though.) -from ingame dna help

Permanent ties, as far as I know, can still be broken, what they can't be is moved or stretched in the same way. Also it doesn't matter which bot makes the ties, both bots can use them as long as they know the address, it's always been like that.

Or were you thinking of something else?
« Last Edit: June 29, 2007, 04:58:09 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 Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #25 on: June 29, 2007, 05:33:17 PM »
Quote
Nums;

Tried Peters bot in 2.37.6 - 2.37.7b and 2.37.7g but the bot crashed them all.

Triangulus in 3.27.6 and 2.37.g manages to form triangle but fails to in 2.43 (and 2.42.7 the earliest 2.42 .exe I have)

fixang still reads 32000 in 3.27.6 though so that is probably not be the problem.

I know that you're speaking to nums but when I tried it has'nt crashed.
Edit: to be sure, I've copyd the code here into a textfile and simulated it in 2.43 and 2.37.6, my advice is put an 'end'   at the end, 2.43 doesn't care but 2.37.6 does. Wow they're moving without they are supposed to move.

Quote
Peter, what do you mean "I was just guesing that a permanent tie supposed to be permanent. So it is'nt."?

A permanent tie is formed after a set number of turns, after that you shouldn't be able to change its position using .fixang, however you can still use .tieang
(tieang ----- Ties harden after a while. Whatever angle and length that they have at that point becomes permanent. .tiang lets me temporarily bend the angle by the value that I store. It springs back though.) -from ingame dna help

Check one of my earlier posts, I am not using tieang to harden the ties, but it hardens. There is nowhere is the code tieang, you can check at the complete code and you will see.

I gues you're quoting from the wiki (I've seen that somewhere) I wil be quoting this, the full story behind the little sentence quote. tieang is setting the angle of the one that did'nt shot the tie, for the one that shot the tie it springs back.
Upgrade version's from EricL.
Quote
18) Prety serious tweaks to ha3A11ed tie physics. Briefly, when a tie hardens, it's length gets set to whetever is is at the time it hardens. The angle of the tie relative to the bot that created the tie gets fixed at that end but the angle at the other end, the end connected to the victim bot, continues to be free to rotate. This makes sense to me in that a bot should be able to control his end of the tie, but not the other end. People may hate this, but it really helsp tie physics I think. Bots should still be able to fix the angle of a tie they did not create by explicitly using .fixang. I also added some slop in the tietorque and tiehooke routines so that small angle deviations and small tie length deviations from the fixed values don't result in forces being translated to the tied bots. This helps get rid of funny harmonics in tightly tied clusters of bots. There are still cases where lightweight bots can vibrate or get whipped around, but I think things are much much better than they were. Also added some limits on the effect of torque values on .aim.
19) Removed .nrg < 0 check in releasebod() so that -6 shots work against corpses.

Maybe I have something more to add, in the code I am using in a multibot.
This is the code, if you didn't now.
Quote
cond
*.numties 1 =
*.multi 1 = and
'0 *43 = and
start
1 .tienum store
628 .fixang store
50 .sharenrg store
'1 43 store
stop

Here fixang is executed every cycle, the 'head' part is staying on his place. The 'body' part can constantly move due to using this code. I am not sure if this code is 'overruling' the other or it is a mistake in the program.

la (or 'le' I have never been good at french) code.
Quote
*.eye4 *.eye6 sub .aimsx store
« Last Edit: June 29, 2007, 05:47:41 PM by Peter »
Oh my god, who the hell cares.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #26 on: June 29, 2007, 10:57:48 PM »
I was never very much of a MB person either, so take this with a grain of salt.  I believe fixang is supposed to work with hard ties (and hard ties only).  I think there's another command that sets a "temporary" angle that the ties then try to fix.

Peter, if your bot still seems weird in 2.37 then it's probably your bot.  2.37 was probably the most stable, MB friendly version we have.  I guess you should just keep playing with things until you get the angles you want, and then we can work backwards and see what sort of values do what.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #27 on: July 02, 2007, 02:46:43 PM »
According to PY's ingame help file;

fixang   -----   This one lets me permanently change the angle between the tie and myself. Zero should make me face you while 628 (half a circle) should make me face directly  away from you.

tieang   -----   Ties harden after a while. Whatever angle and length that they have at that point becomes permanent. .tiang lets me temporarily bend the angle by the value that I store. It springs back though.
« Last Edit: July 02, 2007, 02:47:19 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 Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #28 on: July 02, 2007, 04:38:54 PM »
Well, strangely the tie is temperarely hardening for 1 cycle with that gene I use(without tieang). If the gene activates every cycle it stays hardened. If the gene is activated one cycle the tie is one cycle hardened. It isn't really a problem, but I just found it a little strange that the hardened tie can become a normal tie anytime, maybe I will use tieang in my code, see what will happen. But almost desame is happening 3.37.6 so that probably alright and it will be supposed to act like that.

Is it true that in the beginning that the movement of multibots is being multiplied(or anything else strange). I've had strange things in my multibot I have put a timer into it (first 50 cycles do nothing) and it was just acting perfect.

If I have understuud, the whole tie-system is being trown overboard in 2.5 and a new version is becoming created.  If I may ask, how far is version 2.5 already, and when is it possible coming out. Maybe I can help with some things. I have'nt really got much programming experience, in fact all the the programming languege I've got is a few weeks(if it were weeks) playing with the gamemaker-languege. I will in one of the coming days take a look at the code, if I understand it, maybe I can help with some things. I will PM you if I feel I can do something.
Oh my god, who the hell cares.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #29 on: July 02, 2007, 05:01:53 PM »
That sounds strange!

As I understood it ties should harden after a certain amount of time, once a tie is hard, beyond deleting it and remaking, it should stay hard. Thanks for testing that in previous versions of DB btw.

MB's should gain a cost advantage by being MB's, movement cost for example should be reduced. (Something I read earlier in wiki I think).

In version 2.5 (I presume you are talking about the C++ portal) Numsgill (AFAIK) is intending to make quite a few changes, a lot of which are regarding the introduction of proper physics with regards to ties etc. /me looks around for Num's to confirm this!

The whole C++ thing though is a big job and doesn't, as yet, have a timeline. If you feel like helping out in the meantime though perhaps you would like to take a look at the VB code and see if you can spot any of the current bugs that are 'bugging' us!
(Again, Num's can guide you in the right direction here, I do have the VB code somewhere but only used it to help spot some of the bugs when EricL was fixing stuff).

Any help, even if it is just spotting bugs in the first place, is always apprecitated, DB is a group project after all. We can thank Carlo (the original programmer) for that!
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