Difference between revisions of "Talk:Humilis"

From WikiManual
Jump to: navigation, search
Line 77: Line 77:
 
  stop
 
  stop
 
  end
 
  end
 +
 +
== Simplifying using bit manipulations ==
 +
It seems to me there might be a better way to manipulate values to get  1, -1, or 0 etc. for use in cheap birth tie removal et al.
 +
 +
I'm thinking perhaps some sort of bit mask to XOR against the value...  I'd really have to crack open my old textbooks in bit manipulation.
 +
 +
let's see, I seem to remember this:
 +
 +
let A,B be numbers
 +
 +
A & A = A (ie: and)
 +
A ^ A = 0 (ie: XOR)
 +
 +
...  --[[User:Numsgil|Numsgil]] 10:20, 6 Nov 2005 (MST)

Revision as of 12:20, 6 November 2005

Humilis is a WikiBot.

What is a WikiBot?

From Endy: Wikkibot was an idea to construct a bot online where many people can edit it. Lord knows what a hellacious bot we could all make working together.

So maybe we should construct a WikiBot template to let users know what a WikiBot is... --Numsgil 14:45, 5 Nov 2005 (MST)


I think doing 7 rnd for both the refvar and myvar part will produce numbers unlikely to be the same. If you want to test the same refavr to myvar combination, you'll need to save that 7 rnd to a memory location to use later. Or come up with something incredibly ingenious. Or use dup. Whichever you want ;) --Numsgil 09:42, 28 Oct 2005 (MST)


use NewMove
Is this use NewMove part of the bot code?
and something that can be added to older bots for use in 2.4x?
and if so ... will they still work in pre 2.4x versions?
how does this work? Is there a subroutine/function "NewMove" in 2.4x then that
somehow shunts the 'multiplication' of the accerations in old bots?
please share your thinking so we aren't left out in the cold, eh. ;) Griztalk 09:26, 5 Nov 2005 (MST)
it works exactly like def statements do. When the program reads the .up/.dn/etc. commands during the physics loop, they get multiplied by mass unless the use NewMove preprocessor instructor was included in the DNA. --Numsgil 14:41, 5 Nov 2005 (MST)
'Humilis

cond
start
'Naval Cord Removal
.tie *.robage sgn 1 sub -1 mult mult
.deltie *.robage 1 sub sgn 1 sub -1 mult mult
add inc
'this should do the trick to allow both tie and deltie to use same inc
stop

cond
*.robage 20 mod 0 =
'Finally figured out how to use mod handily :)
start
7 rnd 50 store
stop

cond
'Gene should allow bot to test amongst 8 different refs randomly
.refup *50 add * .myup *50 add * !=
*.eye5 37 >
start
'Cheap shots :)
.shoot dec
stop

cond
*.nrg 5000 >
start
200 .aimdx store 'i had to put some iflamma consepts in there -bau
50 .repro store
stop

cond
*.eye5 0 >
*.refeye *.myeye = and
*.eye5 0 = or
start
314 rnd .aimdx store
stop

cond
*.eye5 0 >
*.vel 20 <
start
20 *.vel sub
2 div
*.body mult 1000 div
.up store
stop
end

Simplifying using bit manipulations

It seems to me there might be a better way to manipulate values to get 1, -1, or 0 etc. for use in cheap birth tie removal et al.

I'm thinking perhaps some sort of bit mask to XOR against the value... I'd really have to crack open my old textbooks in bit manipulation.

let's see, I seem to remember this:

let A,B be numbers

A & A = A (ie: and) A ^ A = 0 (ie: XOR)

... --Numsgil 10:20, 6 Nov 2005 (MST)