Code center > Dead-End and Solved Suggestion Requests

Bitwise Functions

(1/2) > >>

Anonomous Guest Person:
Like AND, OR, and XOR.
Infact, just AND, OR, and XOR.

(And not just in the conditions, in the actual gene itself too, darnit.)

(For those who don't understand how they work, you hafta look at the number in binary to fully understand.
AND checks each bit of two values, and unless both are 1, the result will be 0.
10100101 AND
00101101 equals

OR checks each bit of the two values, but unlike AND, only one of the two bits have to be 1 for the result to be 1.
10100101 OR
00101101 equals

And XOR checks each bit of two values, but unlike AND and OR, it only results in 1 if ONE (and no more then one) of the bits is 1. (They basically have to be different. The bits, that is.)
10100101 XOR
00101101 equals

What use would they be.  I'm not saying they have none, just that I don't see what a bot could do with them off the top of my head.

Anonomous Guest Person:
No one can think of an idea on the top of their heads. :P
Heck, I'm sure they had no idea what use writing would've had, and yet it's one of the most used inventions ever, well, invented. :P

You can make at least some "conditions" in the genes. It can be a bit tricky getting to a comparision mode with a final 1 mult(activate) or 0 mult(deactivate), but I think there should be some "cost" for not using normal conditions.

I worked out a Single Store combat bot once, as sort of a challenge, using a method of disabling all but the desired value/storage location then adding all the values/storage locs together(Sorry I can't really describe it better :lol: ). This would basically be what your talking about with OR and XOR, in the action step.

Endy B)

We can add them no problem.  XOR, NOT, OR, and AND are the 4 basic building blocks of all higher functions, like add and mult.  So I guess having them could allow for some non-standard mathematics to develop.

And it would put us on par with Avida.  They have bitwise mutations to achieve simple arithmatic.  We could then run some avida like sims in DB.


[0] Message Index

[#] Next page

Go to full version