Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Welwordion

Pages: 1 2 [3] 4 5
31
Bot Tavern / Bots that learn to associate
« on: May 07, 2006, 07:14:13 AM »
Ok I thought really really hard about that system(so hard Iam to exhausted to try to write a bot code right now)

A bot could try to search for memory places that change within a certain timeframe when bodgain or pleasure occur (independant if its positive or negative pleasure/bodgain), then the bot could save/associate this memory location, after this he would try out adding values in memory locations and see which ones would lead to a change in the associated memory locations(actions) and save these in memory locations that are x=(a constant) places away from the associated memory.
As memory locations have only 3 digits the rest of the digits can be used to store values the associated memories are wished to be(in the associated memloc) and values which the actions relating to these will store
into themself(in the actions memloc), where these values will be reversed (mult with -1) when the wished value in the associated memory is smaller then the real value.
(If you want something to be as large as possible a negative value in actions and an 0 or a negativive number in wished value will make it.)
With this concept and by storing copies of certain memlocs in the racial memory, bots could slowly learn which action to take prefer etc.
So what you think?

32
When we run ex nihlo sims or just junk sims it might be really useful to have sexrepro so that once a bot develops repro he can use useful genes of the other bots that developed with him (that way the other genome is not wasted). Just wanted to say that.

33
DNA - General / sin and cos approximation
« on: May 05, 2006, 02:22:54 PM »
I tried to write a gene to aproximate sin and cos , did not test it yet but thought I would post it here so you can test it yourself and see if the code is correct or improve it.

Code: [Select]
'cos x = 1 - x^2/2! + x^4/4!- ...(I kept the error small by using cos x = - cos (pi-x) and cos (x+pi) =- cos x such limiting x to <= pi/4)
1
*.aim 628 mod 314 floor 314 sub sgn -2 mult 1 add *.aim 314 mod 2 div mult *.aim 628 mod 314 floor 314 sub sgn 314 mult add
2 pow 200 div sub
*.aim 628 mod 314 floor 314 sub sgn -2 mult 1 add *.aim 314 mod 2 div mult *.aim 628 mod 314 floor 314 sub sgn 314 mult add
'splitted the numbers as we can only store numbers smaller than 10^9 and we need to minize rounding errors
3 pow 24000 div
*.aim 628 mod 314 floor 314 sub sgn -2 mult 1 add *.aim 314 mod 2 div mult *.aim 628 mod 314 floor 314 sub sgn 314 mult add
mult 1000 div add
'the next line corrects alegbraic sign
628 *.aim sub abs 313 floor 313 sub sgn 2 mult 1 sub mult

'sin x = x - x^3/3! + x^5/5! - ...(again kept the error small using  sin x = sin (pi-x) and sin (x+pi)= - sin x )
*.aim 628 mod 314 floor 314 sub sgn -2 mult 1 add *.aim 314 mod 2 div mult *.aim 628 mod 314 floor 314 sub sgn 314 mult add
*.aim 628 mod 314 floor 314 sub sgn -2 mult 1 add *.aim 314 mod 2 div mult *.aim 628 mod 314 floor 314 sub sgn 314 mult add
3 pow 600 div 100 div sub
*.aim 628 mod 314 floor 314 sub sgn -2 mult 1 add *.aim 314 mod 2 div mult *.aim 628 mod 314 floor 314 sub sgn 314 mult add
'splitted the numbers as we can only store numbers smaller than 10^9 and we need to minize rounding errors
3 pow 24000 div
*.aim 628 mod 314 floor 314 sub sgn -2 mult 1 add *.aim 314 mod 2 div mult *.aim 628 mod 314 floor 314 sub sgn 314 mult add
2 pow mult 5000 div 100 div add
'the next line corrects alegbraic sign, note that when signum is zero x=pi and sin x =0 so there will happen no error
628 *.aim sub sgn mult

34
Bot Tavern / Two ideas: dummy, puppet master
« on: May 04, 2006, 10:29:10 AM »
You know I thought could a bot not try to use dummies when a enemy  fires at him to distract the enemy and escape sight?
Like airplanes and submarines use gainst rocket and torpedos.

Second I tought it might be nice to make a Mbot that fixes its center bot and uses his ties to navigate the others instead of normal movement. This could be good in gravity sims and if  you change which bot is fixed enable crawling against gravity.

What are your thoughts? Did I say something that was already done?

35
Suggestions / intelligent mutations
« on: May 03, 2006, 06:07:47 PM »
It seems to me that the way mutations apply to Dna are central to the succesfullness of Evosims.
That why I think it might be useful to highlight certain Dna with a higer mutation rates.
For example the value that is stored  could be made more variable then they klocation that the value is stored into. It might be even nice to forbid mutation on certain Dna you want to keep.
Basically its what I always said give mutation rates the possibility to be individualized for every piece of Dna to a certain degree.

36
DNA - General / A lazy turner(turning gene)
« on: May 02, 2006, 05:31:45 PM »
Ok I wanted to create a gene that lets a twobot Mb turn 180 degree when he sees his partner. But strangely he does so only once after birth.

Code: [Select]
cond
*.numties 0 =
*.robage 1 >
start
5 .repro store
.function inc
stop

cond
*.robage 1 =
*.refeye *.myeye =
start
.tie inc
stop

cond
*.eye5 0 >
*.refxpos *.trefxpos =
*.refypos *.trefypos =
start
618 .aimdx store
stop

end

37
Bugs and fixes / birthtie counted with numties?
« on: May 02, 2006, 05:22:35 PM »
I thought numties is not meant to count the birthtie? but it seems to do so (using newest version)
(you also should check multi)

38
Bot Tavern / First wire layer
« on: April 23, 2006, 10:21:19 AM »
Ok, here is the first running version of a wire laying bot(refer to my post about communication networks). He is programmed to be ant bot type like, so we have a queen that will give birth to the first scout(a wire layer).
Thx to the help of purple youko I could debug most of it, however there still seems to be some bugs regarding gene8 which should prevent the scout from reproducing directly after birth, I could bypass this by setting the age condition to 10 > at gene 10, which will cause him to face  the queen when turning back to lay a satellitebot(wirepart) behind him and such preventing him from blocking himself between his parent and child.
Note also that although I originally wanted to create him for both versions he currently only works in 2.4
as their is no out5 in 2.37 and also some other strange reasonprevents a child to determining his function(job)
using the outchannels.
Nevertheless the delgene command in gene 1 ,and the original distance  calculation in gene9(currently disabled by ')  to use for gene 10 shows that I orignally intended to make him compatible for both:


Code: [Select]
def function 50
'queen 1 scout 3 mob 4 satellite 5
def satposx 70
def satposy 71
def job 153

'1Where was the house again? (save hive position) @good
cond
*.robage 0 =
start
*.xpos 971 store
*.ypos 972 store
.delgene *971 sgn mult inc
.fixpos inc
stop

'2I want to be a mother! (If no one gives you a task you become a queen) @good
cond
*.robage 50 >
*.function 0 =
start
.function inc
.out5 inc
stop

'3:( my childhoods over (assigns a task to you)  
cond
*.numties 0 >
*.function 0 =
*.robage 1 =
start
*.in5 2 add .function store
*.in5 2 add .out5 store
stop


'4Mommy!!! (ties to your parent)
cond
*.robage 5 =
start
1 .tie store
stop


'5I am to old for that (free yourself from the tie )
cond
*.robage 6 =
*.numties 0 >
start
1 .deltie store
stop


'6Go and get snacks for the party. (create a single scout)
cond
*.nrg 5000 >
*.job 0 =
*.function 1 =
start
20 .repro store
.job inc
stop

'7I have no mother fixiation.(turns scout away from mother)
cond
*.robage 7 =
*.function 3 =
start
618 .aimdx store
stop

'8My birthplace is a small town in ...(set your first point for distance measurement)
cond
*.satposx 0 =
*.satposy 0 =
start
*971 .satposx store
*972 .satposy store
stop

'9Our house looks so small from here.(measure distance to the last satellite)
'cond
'start
'*.satposx *.xpos sub 10 div *.satposx *.xpos sub 10 div mult
'*.satposy *.ypos sub 10 div *.satposy *.ypos sub 10 div mult 10 div add
'33 store
'stop

'10breadcrumbs? thats outdated. (place the wire/satellite bots when you reach a certain ditance)
cond
*.function 3 =
*.robage 10 >
'*33 6000 >
*.satposx *.satposy dist 800 >
start
*.xpos .satposx store
*.ypos .satposy store
618 .aimdx store
5 .repro  store
.fixpos inc
stop

'11What was I doing again? (resume moving after placing the satellite)
cond
*.refage 0 =
*.eye5 0 >
*.refeye *.myeye =
*.function 3 =
start
618 .aimdx store
.fixpos dec
stop

'12Maybe its a little more ahead?(scout moves on if he sees nothing)
cond
*.function 3 =
*.eye5 0 =
start
10 .up store
.fixpos *.fixpos sgn mult dec
stop

'13yo buddy where are you going? (food our enemy coordinates are shown in out1 and out2)
cond
*.function 5 =
*.refeye *.myeye !=
start
*.refxpos .out1 store
*.refypos .out2 store
stop

'14rumours travel faster then light XD
'(reads info about coordinates and show it in out1 and out2 for the next bot in line)
cond
*.function 5 =
*.refeye *.myeye =
start
*.in1 .out1 store
*.in2 .out2 store
stop

'15lets get internet(satellites tries to get the next satelitte in eye5 so he can read his outs)
cond
*.eye5 0 =
*.function 5 =
start
10 *.eye1 *.eye2 add *.eye3 add *.eye4 add *.eye6 sub *.eye7 sub *.eye8 sub *.eye9 sub sgn mult .aimsx store
stop

'16heh that looks interesting ( turns toward nearest bot)
cond
*.function 3 =
*.refeye *.myeye !=
start
*.eye1 dup *.eye2 sub abs add *.eye2 add 2 div
dup *.eye3 sub abs add *.eye3 add 2 div
dup *.eye4 sub abs add *.eye4 add 2 div
dup *.eye5 sub abs add *.eye5 add 2 div
dup *.eye6 sub abs add *.eye6 add 2 div
dup *.eye7 sub abs add *.eye7 add 2 div
dup *.eye8 sub abs add *.eye8 add 2 div
dup *.eye9 sub abs add *.eye9 add 2 div

dup dup *.eye5 sub sgn 1 sub abs 5 mult add
dup *.eye6 sub sgn 1 sub abs 6 mult add
dup *.eye4 sub sgn 1 sub abs 4 mult add
dup *.eye7 sub sgn 1 sub abs 7 mult add
dup *.eye3 sub sgn 1 sub abs 3 mult add
dup *.eye6 sub sgn 1 sub abs 8 mult add
dup *.eye2 sub sgn 1 sub abs 2 mult add
dup *.eye9 sub sgn 1 sub abs 9 mult add
dup *.eye1 sub sgn 1 sub abs 1 mult add
sub abs

5 sub 35 mult .aimdx store
stop

'17ok you have guard duty(satelites become fixed)
cond
*.function 5 =
*.robage 7 =
start
.fixpos inc
stop


'18the ample is red(stop when you get close enough to an object)
cond
*.refeye *.myeye !=
*.eye5 35 >
*.function 3 =
start
.fixpos inc
stop

end

Well as I said to yoko the next step will be to programm wires that work in both direction or can move along their scout(using the radius/distance from the hive) and also to add the mob(workers/hunters) that uses the information in out1 and out2 to find food.

39
Newbie / Solids and fluids
« on: April 22, 2006, 01:08:48 PM »
Ok thats something up until now I do not really understand what  is the differences in making the sccren a fluid or solid? And what are the exact differences between those 3 states?

40
Off Topic / Mmog with the goal to survive
« on: April 18, 2006, 02:11:04 PM »
While reading I stumbled somewhere over the lines, that someeone wished there would be more MMO games where you would need to colonize a world from scratch.
Well I myself also hope for better MMOG out there and I always wished for a game that would concentrate more on the aspect fighting for survival than killing for money exp and loot.
What about you?
What are your wishes for such a game? What features you would want?
Lets just  dream a little and plan or "perfect game" we never find out there.

41
DNA - General / Find the error: For all who like complicated code
« on: April 17, 2006, 08:11:03 PM »
Tried to make a new search gene that aims at the nearest  bot unfortunately the robot does not rotate, so where is the error?
Code: [Select]
cond
start

'compare the numbers and leave the highest on stack , mark from which eye it came by adding 1000*eyenumber
'repeat the progress until you reached eye9

*.eye1 1000 add dup 1000 mod *.eye2 sub 0 floor sgn mult dup sgn 1 sub abs 2000 *.eye2 add mult add
dup 1000 mod *.eye3 sub 0 floor sgn mult dup sgn 1 sub abs 3000 *.eye3 add mult add
dup 1000 mod *.eye4 sub 0 floor sgn mult dup sgn 1 sub abs 4000 *.eye4 add mult add
dup 1000 mod *.eye5 sub 0 floor sgn mult dup sgn 1 sub abs 5000 *.eye5 add mult add
dup 1000 mod *.eye6 sub 0 ceil sgn 1 add mult dup sgn 1 sub abs 6000 *.eye6 add mult add
dup 1000 mod *.eye7 sub 0 ceil sgn 1 add mult dup sgn 1 sub abs 7000 *.eye7 add mult add
dup 1000 mod *.eye8 sub 0 ceil sgn 1 add mult dup sgn 1 sub abs 8000 *.eye8 add mult add
dup 1000 mod *.eye9 sub 0 ceil sgn 1 add mult dup sgn 1 sub abs 9000 *.eye9 add mult add
dup 1000 mod sub 1000 div


'Test from which location the number came and insert the right rotation/aimdx value

dup 1 sub abs sgn 1 sub abs -140 mult  
dup 2 sub abs sgn 1 sub abs -105 mult add
dup 3 sub abs sgn 1 sub abs -70 mult add
dup 4 sub abs sgn 1 sub abs -35 mult add
dup 6 sub abs sgn 1 sub abs 35 mult add
dup 7 sub abs sgn 1 sub abs 70 mult add
dup 8 sub abs sgn 1 sub abs 105 mult add
9 sub abs sgn 1 sub abs 140 mult add
aimdx. store
stop

42
Suggestions / kill all ... options
« on: April 17, 2006, 07:47:03 AM »
It would be nice to have options that would allow to kill all robots that fullfill a certain condition.
For example an option:
 kill all bots that are (cycles now- cycles at activation)/1000 rounded down generation, which would kill the old generations starting from 0 and progressing to the next generation after 1000 cycles.

43
Suggestions / colors of shots
« on: April 16, 2006, 06:06:55 PM »
I think it would be nice to include what colors have certain shoots into the Wiki, its my second time encountering
a color that I do not know (blue.. or was that virus?)

44
Bugs and fixes / .hit ? (2.42.1
« on: April 16, 2006, 05:48:45 AM »
I read in the wiki that .hit does not save its value so I wanted to test if that is true.
However neither hit (tested with printmem) nor printtouch returned any value different from 0 regardless of situation.
(afternote: I also tested it for 2.42.2)

hm tielen does also return no value

45
DNA - General / Need the right conditions
« on: April 14, 2006, 08:44:27 PM »
ok first:

cond
*.function 0 =
*.swarming 0 =
*.refeye *.myeye =
*.eye1 *.eye2 add *.eye3 add *.eye4 add *.eye5 add *.eye6 add *.eye7 add *.eye8 add *.eye9 add 0 =
or
start
.out3 .tmemloc store
*.tmemval .out1 store
stop

Duid I use the or right? I want it to activate when it sees only his brethren or nothing.


second:

cond

start
.satposx .tmemloc store
*.tmemval .satposx store
stop

cond

start
.satposy .tmemloc store
*.tmemval .satposy store
stop

In order to move the tied unit will be killed, before that happens this information has to be stored.
However the surviving unit uses satposx and satposy usually for his own information storage.
So which cond to insert?

Pages: 1 2 [3] 4 5