Author Topic: I need some help  (Read 4122 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
I need some help
« on: March 11, 2009, 11:33:35 AM »
I resolved the first issue myself  
I am running Darwinsource2.43 source code, the newest available...

Is there a point to (or optional need to have):


a.) Decimal or floating point mean (not whole number)

b.) Decimal or floating point standard deviation (not whole number)

c.) Below one or even negative mean

d.) Below one or even negative standard deviation

Thanks for your help
« Last Edit: March 11, 2009, 03:50:20 PM by Botsareus »

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
I need some help
« Reply #1 on: March 11, 2009, 04:12:02 PM »
I find the source confusing too
I think the mutations settings in a bot are called Mutables.
And I think HDRoutines contains some load functions that should load these settings when loading a sim.
So I would probably take it from there and search for Mutables and such, find out where they load the Mutables in HDRoutines and then track them to see where they get transfered to the GUI.
I think the mutables are initialy fetched from SimOpts wich gets it's value from the gui..
But it can be realy hard to track anything in the code because of the huge amount of global objects that can be accessed from any function in any class.
The Master module contains a function for updating the sim, so if some function just leaves you hanging check to see wich chain of events is triggered next.
Kinda long tedious work... reason why I didn't just find it myself

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
I need some help
« Reply #2 on: March 11, 2009, 04:47:17 PM »
Ok, values between 1 and 3000 for both mean and standard deviation works without issues , so that's what I will keep.

Next Project (Numsgil should know this):
This a lot of information at once so be ready:

I am trying to stop robots from two different file names but which carry the same exact DNA
from identifying each other as friendly. To do this I need to know three things:

1.) Where can I find the codes for sysvars like .refeye or .tin etc.

2.) Is it possible to get the file names of robots from inside the codes that was asked in question 1 above? If so, what code should I add?

3.) How does memval work: Does it read the memory values constantly or only on eye5 initial contact? (and where can I find the code) Is there something like a tmemval (and where can I find the code) .

I also need code to give me a warning when the population of one of the "robot files" reaches 0...


Thank You, your help is greatly appropriated.

P.S.
Hopefully it works out as planned.
« Last Edit: March 11, 2009, 06:03:02 PM by Botsareus »

Offline Shasta

  • Administrator
  • Bot Destroyer
  • *****
  • Posts: 231
    • View Profile
I need some help
« Reply #3 on: March 11, 2009, 06:23:54 PM »
While they wouldn't have the exact same DNA, a much easier way to do this would be to just use an .in .out pair for recognition if *.refeye *.myeye =
You would just need a recognition system something like this:
Code: [Select]
*.refeye *.myeye !=
  'Deal with enemy
*.refeye *.myeye =
*.in1 *.out1 != and
  'Deal with bot that is the same as me, but looks funny
*.refeye *.myeye =
*.in1 *.out1 = and
  'Deal friendly

Memloc and Memval on the wiki has example code for those two, tmemval and loc work nearly the same, but require the tie number you want to read from in .tienum

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
I need some help
« Reply #4 on: March 12, 2009, 01:12:58 AM »
As shasta points out, there are better, DNA driven ways to figure out how to differentiate between bots.  If nothing else, the league rounds code contains some fudge to modify the number of eyes of a bot if it has the same number as its challenger.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
I need some help
« Reply #5 on: March 12, 2009, 12:31:24 PM »
a.) I will ask again: Is there something like a tmemval?

b.)By "code" I don't mean db robot code, I mean the actual Visual Basic code... I know this is a pain to search through all that code but I am less familiar with the code then say Numsgil or EricL because I have not seen it for 3 years. So if you guys can help me out your help is appreciated.

Quote
I also need code to give me a warning when the population of one of the "robot files" reaches 0...

c.)I guess I will have to mess around with the F1 display menu and copy the code from there...
« Last Edit: March 12, 2009, 12:48:01 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
I need some help
« Reply #6 on: March 12, 2009, 01:08:30 PM »
Honestly just do a full text search of the source.  Type in tmemval and you'll find there is such a thing and it's used a couple places in the code.  Look on the wiki for information on memval, etc.  I'm all too happy to help, but I think you could answer a lot of your own questions faster than I could.

You'll have to add something to the main loop to alert you when population is low.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
I need some help
« Reply #7 on: March 12, 2009, 02:19:56 PM »
(lazy), o well I guess I can spend some time...