Author Topic: bugs 2.42.1  (Read 4866 times)

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
bugs 2.42.1
« on: April 03, 2006, 08:45:56 AM »
hmmmmm ....
can't get 2.42.1  to run.  I get a divide by zero error.
this is using 'new sim' which I guess would load in the default.sim
or the last sim I ran, eh?
even tried deleting/replacing the species ...
using only Alga_Minmalis and Animal_Minimals ...
but still get the error.

will run it thru VB when if get a chance later today/tonight.
attaching the error.sim

wonder if I might need to start with a working default.sim
that has been saved with the new version.
could you upload a simple starting default.sim?
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
bugs 2.42.1
« Reply #1 on: April 03, 2006, 09:03:33 AM »
update:
started new sim.
deleted and reloaded species.
saved the settings.
reloaded the settings.
it ran.
exited the program, which I think saves a default somewhere.
now ...
when I start DB and 'new sim' ...
it seems to work. sort of. ;)

I can load in some old sims ...
although I sometimes get different error messages ...
like path to bots or invalid bots ...
and even divide by zero errors but it sometimes loads it in anyway and runs ...
other times the sim I intended to load isn't the one loaded ...
but some default or sim with only veggies.
however ... if I then edit and load in the settings I want ...
all seems to work.

getting closer. ;)

will play more later.
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
bugs 2.42.1
« Reply #2 on: April 03, 2006, 11:08:17 AM »
I don't know how you managed that, Griz. I tried the same thing, but it crashes everytime for me, with division by zero. I can't get it to run nomatter what.
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
bugs 2.42.1
« Reply #3 on: April 03, 2006, 11:14:24 AM »
Yea, I was afraid that old sims would have problems.  I'll look today and see if I can do something simple to make this less of a hassle, maybe turn off my fixes if I can detect a previous sim file version....

Beleive me, this really was so screwed up.  I mean, the loop for saving/loading each species mutations settings (22 values) was executing the correct number of times on thr save (call it N, one for each listed in the species list box 22 values per species) but reading back in N+1 times, reading in the first 22 values of the 70 value costs array!!!!!  The effect was just to fill locations in the species array that the program never used (because the number of species was saved and read in correctly) which was why the program would work although saved costs were all screwed up  - the costs were off by 22 locations!  But after the costs come the saved inital positions for each bot, which were never getting read back in I think because the end of the file would be hit before this.  But now, if you read in an old file with the new code, including the default files, those psoiton values are getting read in and set, but what they are getting set with is off becuase of another loop bug in the save routine I.e. so what before were always defaulted are now being set with random stuff from the sim file if the sim file is from an older version of the code.  This is only one example, there are other similar mis-matches.  So, bottom line, using new code to read in old files has the potential to create really strange behaviour and crash...

Let me know if you see any problems once you get the settings where you want and save them.  From that point on, you should be good to go.

Attached are well formatted default sim and settings files.  Of course, people need to put them in the right places.  I'll add them to the zip up download package.

-E
Many beers....

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
bugs 2.42.1
« Reply #4 on: April 03, 2006, 11:29:47 AM »
Note that in addition to putting the new default files in the correct directories, you also have to delete your lastexit.set file in the Settings directory.
« Last Edit: April 03, 2006, 11:31:53 AM by EricL »
Many beers....

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
bugs 2.42.1
« Reply #5 on: April 03, 2006, 12:11:05 PM »
yes ...
I can see how the position mis-matches can screw everything up.
I recall Num's saying he suspected that was a problem ...
I think we got thrown off the track because it worked at all!!!

Quote
delete your lastexit.set file
yes ... seems that was the trick for me ...
[without using your attached files]
I did 'new sim', did NOT try to run it ...
deleted all species, added a min veggie and animal ...
and then saved the settings as 2421Basic.set
I then exited the program, again ... without attempting to run it ...
which I think then overwrote the lastexit.set file.
after that, it seems to come up ok ...
and I can even load in old sims ...
although with mixed results and strange error messages ...
but I don't get the zero error and they sometimes run.
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
bugs 2.42.1
« Reply #6 on: April 03, 2006, 12:33:37 PM »
your sim and set files work fine ...
but I do have a question:
in General Tab  ... I find the veggies set to 5000nrg/cycle!
is that what you intended?

but so far ... no problems using them so Testlund should be
able to as well.
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
bugs 2.42.1
« Reply #7 on: April 03, 2006, 12:57:58 PM »
It's just a value.  I was running a "capture the flag" sim before I created them with a very large field and only two veggies, each in opposite corners, each with an associated population of bots who once their populations grow enough, encounter the other and start battling it out.  I wanted the veggies to be super stable and supply infinite energy, access to which is limited only by space to feed since there is only one veggie per corner.  I mearly fogot to set that value to something reasonable before I created the default files.

-E
« Last Edit: April 03, 2006, 01:00:11 PM by EricL »
Many beers....

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
bugs 2.42.1
« Reply #8 on: April 03, 2006, 01:02:00 PM »
I'd be very appreciative if you or Testlund could walk through loading and saving sims and settings and verify that everything that was broken is now fixed...

Thanks,

-E
Many beers....

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
bugs 2.42.1
« Reply #9 on: April 03, 2006, 01:56:45 PM »
Quote
I'd be very appreciative if you or Testlund could walk through loading and saving sims and settings and verify that everything that was broken is now fixed...

Thanks,

-E
yeah ... been meaning to do that in a controlled way.
there's tons of settings, eh? ;)

say ... just where is the save/load list?
if I copy the variables to be saved/loaded ...
I can then make a text file of them to use as a 'flight' checklist.

one mo question:
I'm a loop control systems guy ...
so I lke to look at the system/environment as a 'whole' ...
and how to tune/control it via feedback loops ...
the important thing being how everything works together
as opposed to the individual entities making it up.
so I'm interested if the total energy of the sim tracked anywhere?
input would be the sum of nrg/cycle for all veggies, yes?
what are the losses?  waste? costs? loss of nrg stored as body when a bot dies?
I'm just wondering if watching whether a sim/environment is gaining/losing
energy or has reached an equilibrium and is cycling about some value
might be of use in 'tuning' a sim ...
perhaps giving one a better idea of what the 'sim' needs in the way
of bots so that it remains vialble, neither 'ruinning away' with becoming
overpopulated nor 'drying up' and dying out.
is that information that might be useful for adjusting the nrg/cycle for
veggies ... or for adding bots that would tend to bring the 'system' back
to something stable.
so I'm wondering where to find this info and if we might graph these
inputs/outputs in a way that might be of use.
« Last Edit: April 03, 2006, 08:07:45 PM by Griz »
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
bugs 2.42.1
« Reply #10 on: April 03, 2006, 02:12:20 PM »
Quote
where is the save/load list?

The routines for saving and loading simulations, including the routines for saving and loading entire robot bodys (saved sims involve saving and loading each and every bot in the sim, which is one of the primary things that distinguish saved sims from saved settings) are in HDRoutines.bas.  SaveSimulation() starts at line 89 (version 2.42.1).  The routines take up most of the module.

The routines for saving and loading settings files are in OptionsForm.frm beginning with savesett() at line 1791 (version 2.42.1).

Regarding the total energy in the system and tracking and graphing this, I think that is a most excellent idea.  It would really give you some feedback as to how and where a sim stabalizes.  I can even imagine options which could auto-adjust costs or veggy nrg per cycle to keep energy in the sim balanced or at a costant value.

To my knowlege, the total energy in a sim is not currently tracked, but I don't think it would be difficult to do so nor would it be difficult to graph this.  Perhaps I'll take a look at this later this week.  Neat idea.

-E
« Last Edit: April 03, 2006, 02:19:38 PM by EricL »
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
bugs 2.42.1
« Reply #11 on: April 03, 2006, 02:15:19 PM »
Works wonderful now! ..and the settings are actually SAVED in the saved sim!  :wub:

I think the default file you provided should be bundled with the program file; 2.42.1.exe, default.set and default.sim in one zip file!  :)
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
bugs 2.42.1
« Reply #12 on: April 03, 2006, 02:23:22 PM »
Quote
Works wonderful now! ..and the settings are actually SAVED in the saved sim!

Whew.  After my initial starting position box screw up in 2.42.0, I was concerned that age was starting to take it's toll on coding ability...  :)


Quote
I think the default file you provided should be bundled with the program file; 2.42.1.exe, default.set and default.sim in one zip file!

Excellent idea.  Already done.  :)
« Last Edit: April 03, 2006, 02:25:36 PM by EricL »
Many beers....