Darwinbots Forum

Code center => Suggestions => Topic started by: Zelos on February 26, 2005, 02:24:46 AM

Title: Senses
Post by: Zelos on February 26, 2005, 02:24:46 AM
we all know we have 5 senses, vision, sense of touch, sense of hearing, sense of smell and sense of taste. but in db we only have vision and sense of touch to know what happen around them. I think it would be good whit  smell and hearing. this 2 are also distance senses. each sense would have its advantage and disadvantage, like:
vision: short range, lots of info about the bot
hearing: medium range, medium info about the bot
smell: long range, little info about the bot
what do you think guys?
 B) zelos B)
Title: Senses
Post by: Numsgil on February 26, 2005, 03:29:46 AM
I'm not sure about hearing (if a bot drops in a forest and there's no one around to hear it, does it make a sound? :P) but we could tie 'smell' to the env grid.  Bots could 'smell' what's in the particular sector they're in right now.

We could also allow custom proteins to be stored in the env grid.  Basically hormones!  Ant bots for real now!

There are some other senses animals have.  Fish have their lateral lines, which help in detecting movement around them, helping them to stay in schools.  I'm not sure how all of it'd work.
Title: Senses
Post by: Old Henk on February 26, 2005, 12:18:46 PM
Dont forget we've also got touch in DB.
being (correct me if wrong)
feeling other bots
.hitup
.hitdn
.hitdx
.hitsx
.hit

feeling shots
.shup
.shdn
.shdx
.shsx
.shflang
.shang
Title: Senses
Post by: PurpleYouko on February 26, 2005, 12:25:57 PM
I like the idea of smell. It would have to work witht he e-grid.

What I see as a possible method is for the bots to smell a 3 by 3 grid (stores in an array) with their current location in the centre. The readback would tell them which of these 9 grid locations has the highest concentration on each level and which has the lowest.

Have to think about this a bit but it seems like a very good use of the e-grid.

Hearing is not so great. It would be difficult to employ but who knows what will happen by V4.0. Could be a useful directional tool.



  :D  PY  :D
Title: Senses
Post by: Zelos on February 26, 2005, 01:03:26 PM
henk, I said sense of touch.
the hearing would be good coz then the bot can hear if osmething is coming from the behind. a bot who is runing for a prey (the hearing bot) would make alot more sounds than some1 who is going slowly to attack it. but whit smell we cant get a really good ant
Title: Senses
Post by: Botsareus on February 26, 2005, 02:30:27 PM
Hearing will be nice in the future

For one thing we are adding music so how about later add sound as well; We can have a little Sonar thing option , and when you drag a mause over a sertain area you hear what noise bots are making in that area.

If ever make it we can even use my soft. to make some sound effects. For one thing small sounds are easy to upload...
Title: Senses
Post by: Zelos on February 26, 2005, 03:10:04 PM
ya, that would be fun. but we could also use the hearing to make the bots signal other bots of the same species something, like if its ready to mate or not
 :evil: zelos :evil:
Title: Senses
Post by: PurpleYouko on February 26, 2005, 03:21:20 PM
Mating calls?

Cool  B)

 :clap:  PY  :clap:
Title: Senses
Post by: MightyPenguin on February 26, 2005, 03:39:36 PM
Actually, we have somewhere between nine and twenty-one senses. Including proprioception (http://en.wikipedia.org/wiki/Proprioception), which has to be one of the coolest things I have ever read. Better even than logorrhoea (http://en.wikipedia.org/wiki/Logorrhoea).

I think the limited number of senses in darwinbots comes from the simplisticness of the enviroment. A sense is something that processes information from your surroundings, right? The more complex the enviroment, the more forms information can be transmitted in.

I'm not sure I'm happy adding arbitary senses like this. I'd rather model a deeper enviroment and give bots a way to tune into what's going on in that enviroment.
Title: Senses
Post by: Botsareus on February 26, 2005, 04:03:45 PM
Yea this is all stuff for the far future. Right now lets get the basics of the program worked out correctly.
Title: Senses
Post by: MightyPenguin on February 26, 2005, 04:05:27 PM
Which bit would you call basic? What bits of the program are "core"?

:/ Difficult question.
Title: Senses
Post by: Botsareus on February 26, 2005, 04:20:33 PM
:D All I am saying is what PY and NUM are working on right now is the correct thing to work on...
Title: Senses
Post by: PurpleYouko on February 26, 2005, 04:26:26 PM
We just need to get the mechanics of it all working and everything balanced before we add anything too radical.

For the moment the e-grid and associated metabolism stuff seems like the main priority.

I am also working on the user interface, new menu functions, user definable background piccys and the like.

 :D  PY  :D
Title: Senses
Post by: Light on February 26, 2005, 07:30:08 PM
if you really wanted hearing you could have something like in1 and out1 say one out and 5 ins and they give the values from the 5 bots closest to you from all directions allowing some form of limited comunication between groups of bots.
Title: Senses
Post by: Numsgil on February 26, 2005, 10:58:43 PM
The problem with sounds is that it would be computationally expensive.  Each robot would have to figure out the sounds of each other bot.  That adds up when you have 1000 robots crawling across the screen.
Title: Senses
Post by: Zelos on February 27, 2005, 01:53:33 AM
if it slows down the simulation to much it aint worth it now. but wouldnt smell as well slow it down?
Title: Senses
Post by: PurpleYouko on February 27, 2005, 02:13:50 AM
Smell wouldn't be so bad as the robots would only have to check a very small number of grid locations on each cycle. That kind of computation is very fast.

 :D  PY  :D
Title: Senses
Post by: Zelos on February 27, 2005, 02:31:25 AM
sweet, if we add smell, the bots should be able to decied little what smell they release. kinda like:
Code: [Select]
cond
start
5 .fermo store
stop
then it release a fermone of type 5
and to notice what it smell
Code: [Select]
cond
5 .smell =
start
*.smeaim .aimdx store
stop
here it smell the fermone of type 5 and aim to the direction it smell most of it from. .smeaim is smell angel, the angel which it smell most of it. how about it?
Title: Senses
Post by: Light on February 27, 2005, 04:55:23 AM
for hearing your just  limit it to bots that are close by say the nearest 5 or 10, rather than having it over the entire population
Title: Senses
Post by: Numsgil on February 27, 2005, 08:31:58 AM
Even then you have to find which robots are close enough to other robots to hear.  Still means checking every robot against every other robot.  Basically O(n^2) for computer science people.

There are ways to make it faster, something along O(n log(n)), still not great.  And it gets worse the more bots you have.  ANd how worse it gets gets worse as you have more bots.

And what about shouting loudly?  And what about a group of 10 creatures all shouting at once?
Title: Senses
Post by: PurpleYouko on February 27, 2005, 11:18:49 AM
Darwinbots uses a "sorted" list which keeps track of the x positions of all the robots in a dynamic array.

This speeds things up a whole lot since we don't need to go quite as far as n^2 when we are calculating. We just look at a smaller slice of the population to save processor time.

It is still by far the slowest part of the program though (that and graphics)

 :D  PY  :D
Title: Senses
Post by: Botsareus on February 27, 2005, 11:28:08 AM
The Pain <--- Yep same problems with PB, Imagine if yo got 20 robots pushing each other off the screen.
Title: Senses
Post by: MightyPenguin on February 27, 2005, 01:02:37 PM
Model the enviroment, I'm telling you,and everything will follow after. Trust me on this. Instead of searching through all the bots to find which ones are closest, then looking at what they're saying, model sound waves as objects. Update positions every cycle and set up a rule for collisions.
Title: Senses
Post by: Botsareus on February 27, 2005, 02:30:28 PM
seeing witch robots are closest and setting up rules for collison is kinda the same thing, unless "seeing witch robots are closest" was an idea to actualy check the relative position of each robot and then do another loop to get the closest robot. And anyway I dont think there is going to be mutch difference of speed.
Title: Senses
Post by: MightyPenguin on February 28, 2005, 01:11:14 PM
Fuck yes. I've solved it. :pengysmiley:  Add a layer to the e-grid that stores the objects currently present in that square. Then, when a bot wants to check hearing or smell or sight or anything like that it can access that information for a suitable number of squares in each direction a get a small list to check distances for.

You'd never need to search the entire array for anything ever again. At least from a single bot perspective.
Title: Senses
Post by: Numsgil on February 28, 2005, 01:21:24 PM
We could have sounds be like regular stuff in the env grid only it'd diffuse into neighboring cells quicker.  Then it'd work.

I'll get back to streamlining the program again soon.  I've learned more about how VB works and I think I could add another 30-40% speed increase to large sims.  Would make these things less of a hit.
Title: Senses
Post by: MightyPenguin on February 28, 2005, 02:46:31 PM
Dude, I just told the better part of the CPU load how go shove its head up its arse and you have nothing to say? At least tell me how badly I got it wrong.
Title: Senses
Post by: Numsgil on February 28, 2005, 02:48:51 PM
I actually was thinking of something like that for the collisions system, since ideally I'd like some robots to be huge and it'd make the current collision routines slow.

So basically good idea.

Not sure how effective it'll be till I try it out.
Title: Senses
Post by: Zelos on March 03, 2005, 11:43:54 AM
guys, you know that animals like the shark have a sense of electricity (http://en.wikipedia.org/wiki/Electroception)? would that be possible in a later db version?
and when its about the vision of the bot, we all know that electromagnetic spectrum (http://en.wikipedia.org/wiki/Electromagnetic_spectrum) is pretty large, everything from radiowaves to gamma waves. what we humans see is just a tiny part of it. it goes from 405 THz(740 nm) to 790THz (380nm). but many animals see in ultraviolet and many plants use it. so why not give plants/animals colors (wavelenght / Frequency) to identefy them. instant of .refeye (which tells about the dna, since when have animals been able to do that?) we give  them like a color that is decieded in the begining of their life whit something like:
Code: [Select]
cond
*.robage 0 =
start
460 .color store
stop
where 460 is the frequency in THz or wavelenght in nm, what ever you like most, and color is the color the will have bot. yeah I know what you think, what if the bot use this gene over and over whit random colors all the time? a way would be it would cost alot more energy to change the color after the bot is 1 cycle old. while its free before it. and maybe to program to make it so that "X rnd .color store" will always become 0 .color. in thiis way it will not be good whit rnd coz it makes you show more. and to see what color it have:
Code: [Select]
cond
*.refcolor *.mycolor !=
start
bla bla
stop
this would make the bot do what ever you replace the bla bla whit when the color doesnt match his own. but this would make the bots see the entire spectrum. so how do we solve that? we could use it like:
Code: [Select]
specstart
400
800
specstop
this makes the bot see from 400THz to 800THz, but it should be like that the bigger the difference between the numbers are the mroe it costs. a bot who see the entire spectrum would use so much energy it would be dead before it reach a age to talk about. what about this formula?
F=frequency difference, in this case 800-400=400
(F/100)² energy per seconds
the good things whit this is that it become much mroe expensive the bigger the difference is. a hunting bot who see 2 different bots and both of them have a color that the hunting bot cant see apphere the same.
correct me if im wrong numsgil, arent you working on the enzyme system? if so, wouldnt it also be possible whit a protein system. like 1 protein gives the sight of X to Y and cost Z to make, or something like that, what do you guys think?
and onefunny thing would be that if we run a simulation whit this it would sooner or later develope a color that means "poison", in reality black,red,yellow have that symbol(but they need to be mixed to get that message), and it would most likly be in the range most bots see, and other colors would also have other meaning. doesnt this sounds fun?
Title: Senses
Post by: MightyPenguin on March 03, 2005, 03:18:59 PM
Check (http://darwinbots.proboards20.com/index.cgi?board=general&action=display&num=1082036382)

Ignore the first few pages, it's me talking rubbish.

Important; in this simple enviroment, how does electroception differ from any other sense? It doesn't. And the implementation you describe makes it little more than colour sensitive sight.
Title: Senses
Post by: Numsgil on March 03, 2005, 03:50:04 PM
If we implement smell, we can add chemicals to specifically release in a place to identify us.  Most animals identify each other by smell.

A bot would have to be smart enough to detect sudden spikes in certain proteins in a env grid that tells it information, "like this one is one of me".
Title: Senses
Post by: Zelos on March 03, 2005, 04:22:12 PM
numsgil, if I dont remember wrong I sugjested it. but then I called it fermones, which it mostly are, or isnt it? well it would look like this when you release it:
Code: [Select]
cond
start
5 .fermo store
stop
this release a phermone of type 5
and to identify it:
Code: [Select]
cond
5 .smell =
start
*.smaim store
stop
this gene checks if the phermone its smelling (.smell) is of type 5, and it is in this case, so it aim in the direction which smells most (.smaim)
this makes it look a the direction, like if it was searching for a mate ;) but let us say now that the bot in question who released the phermone is of a different type but have mutated to fool this mate ready bot. this smelling bot is programed to fool mate crazy bots to come to them and then eat them, those little devils :devil: .

 then it need another way of identification. thats where´vision comes in. I think identifications like .refeye and stuff like that is wrong, since when have the life on earth been able to see how many genes each other use to do stuff? I know this is a simple program, but its evolving fast now so I think its time to talk about removing it.

whit vision and smell it can also identify the bot, its harder to mutate to simulate both conditions coz of the mating bot has the color of 500THz and the fooling bot have 499THz or a color outside of the seeing range the mating bot, the mating bot will be able to tell the difference.

 now the fooling bot got truble, hes preys have sudenly out smarted him and are probebly doomed to die out.  :shoot:  :huh: , this is a case where color and smells are both good. phermones can easly be changed so it can work as a way of comunication, like it is for ants, while colors can be a way of identification whit out seeing things you cant see (refup, refdn, refeye) another good thing whit color is that it might evolve to make some colors to be a signal.

 if a bot who hunts plants and there is 2 kinds, 1 is poison and the other not. the poison 1 is having a color or 900THz and the none-poison is having 800THz. the plant eating bot will evolve to tell that 900THz color=poison and then if we add another poisoness plant it will most likly evolve to have a color of 900THz coz it see that the bot who eat them leave them alone when they is having that color.

 you see the advantage? if you dont look at nature, bees have the black/yellow colors which mean "poison/danger, leave me alone" most animals leave them alone coz of that. and I know a fly who have seen this and copied it, so many animals leave them alone, at distances they are "bees" for the eye.

edit: paragraph breaks from Numsgil
Title: Senses
Post by: Numsgil on March 03, 2005, 04:28:05 PM
Hey Zelos, you mind breaking the above into paragraphs?

My mind melts easily.

NM, did it myself.
Title: Senses
Post by: Numsgil on March 03, 2005, 06:25:14 PM
We have to approach color carefully.  We definately want these to occur in whatever system we have:

1: hardy but not foolproof system for conspec identifiation
2: foolers, like the angler fish, that lure prey to them by pretending to be something they're not.
3: warning signals that tell others that you better not mess with me.
4: mimics, that pretend to be part of a species but aren't.  The 'cow birds' (that's what they're known as in vernacular) of the east mid-west US push eggs out of other species nests and lay their own.  Then the other species raises its chicks for it.

The current system doesn't have 2 or 3 really (although they can be faked).
Title: Senses
Post by: Light on March 03, 2005, 07:04:26 PM
with 3, with have things like rebody or refpoison which act like that, but even if you send out signals like "im tough go away" the opposing bots aren't going to leave it alone, its a dog eat dog world and somehow they are going to have to engage the big tough bots in order for there species too survive.
    Its just at current there aren't many bots that actually take on board information about its target and the environment, like whether the oposing bots are shot bots or use ties, should I then build slime or shell or both and should I tell my friends about it? Is it a big fat bot, what defenses does it have, what weapons should I use? what is my best strategy should we group together or spread out, most bots just go there's a target move towards it and fire rather than actually having any higher sort of thinking, granted some bots do use some of what I have said, I just think it would be cool if it was used a lot more, to have more complex bot behaviour.
Title: Senses
Post by: PurpleYouko on March 03, 2005, 09:11:35 PM
Back when people used in and out for identification (like I Flamma), we had a few mimic bots out there. My own "Hunter" was one of the first Flamma killers that used this method.
In most other ways it sucked but it did succeed in dethroning the flaming one.

 :D  PY  :D
Title: Senses
Post by: Numsgil on March 03, 2005, 09:18:50 PM
The best conspec system uses memloc.  That gives you 1 out of 1000 (okay, more like 800 with sysvars) that the enemy has to guess between for which one you're using for conspec stuff.

Also makes the definition of conspec very easy.  'You are one of me since you have the number 25456 written to memory location 256'.
Title: Senses
Post by: Endy on March 03, 2005, 10:56:02 PM
What happens if you query their *.memval with your memloc, then pluged that number back into your memval to figure out the value stored there? (Man I can't believe I just came up with that :blink: ) Complicated to even consider but would fool an enemy bot using just memloc.

Endy ;)
Title: Senses
Post by: Numsgil on March 03, 2005, 11:24:48 PM
You mean memloc instead of memval.

do:

 .memloc .memloc store

wait a cycle

*.memval .number store
.number .memloc store

wait a cycle

*.memval .number store

That would do it.  But that's a three step system, and that assumes the number stored in .number is constant.

Imagine if a robot just wrote *.robage / 100 to .number.  Then another robot just checks to see if *.refage / 100 = memval for conspec recognition.  That's much harder to crack.

I think eventually we will see memloc/memval as an important part to any conspec recognition system.
Title: Senses
Post by: Zelos on March 04, 2005, 01:33:50 AM
I still think that colors would be better, whit it the bot are able to to have a color that maybe he doesnt want some bots to see but others. the bot is then able to send a message like "come to me" to some bots, adn they´ll come. while the bot apphere to be somekinda wierd color to those who cant see that color.
Title: Senses
Post by: Endy on March 04, 2005, 04:33:17 PM
Yeah I figured out a simliar method to fool others(checking your memloc) by  simply randomly increasing .memloc so it appears your actively searching, but are instead forcing the enemy to expend nrg storing your fake values.

I use basically this same method for in/out, in all my bots, just in case they run up against a mimic(unlikely yes, but you never know).

Endy ;)
Title: Senses
Post by: Light on March 04, 2005, 07:04:58 PM
yeah but you dont have to have your bots use one sort of recognition, you can use lots say refeye in1 and memloc to identify each, its unlikely an enemy bot will mimic more than one location. Mimics are good against a specific species but they dont  get to the top spot on this alone because they have to tackle a variety of bots each with different ways of recognising friends, its why I dont bother too much with mimics, I think its a small area, where there are more significant ways to play with a bot to make it better, but I am very tired and maybe someone will prove me wrong