Poll

Should settings files go away?

Yes, I'd be okay with that.  I never use settings files, sims work for me, so blow them away.
3 (33.3%)
No.  I use settings file as I describe below.  Please don;t get rid of them.
1 (11.1%)
Maybe.  I'd be okay with settings files going away only if you deal with what I describe below in this topic.
3 (33.3%)
Don't care.
0 (0%)
I still like cheese, Gromit.
2 (22.2%)

Total Members Voted: 9

Author Topic: Should we do away with settings files?  (Read 12015 times)

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Should we do away with settings files?
« on: November 17, 2006, 07:00:29 PM »
Settings files today are essentially a sim file without the bots (and without shapes and teleporters and so on).  I think one of the original intents was to provide a meachanism for saving an 'empty sim' that could be used as a starting point over and over with different organisms.  Perhaps also as a small size way to pass around settings and also to re-loaded the settings used at the last exist so settings are "sticky"

To be clear, it is currently *not* the set of settings (such as poff shots on/off, impact dots on/off, etc. ) that are sim independent.  I will likely propose something on that issue separatly - this poll is about the utility (or lack there of) of user savable/loadable settigns files).  But today, settings files are basically a sim file, but without the bots and other stuff.

Personally, when I want to start a new sim with the same settings as an existing one, I load the existing one and then "Start New".  If I want different organisms, I delete the species and then start new and then add the new species.  Basically, personally, I don't use settings files at all.

Most of what the default.set file has been used for in the past I.e. setting reasonable default settings, has recnetly gone internal to the code and future versions will likely do away with default.set independent of whatever is decided here (indeed, as of 2.42.9, a default.set is no longer necessary).

As above, the concept (though perhaps not the actual implementation) of a lastexit.set is worth keeping in that I think it makes total sense to re-load the program using the same settings that were used last time.  So, independent of this decision, program settings will continue to be "sticky" across invocations, though I may do it with sim files or registry settings or something else instead.  And yes, I know there are gaps with this today - settings that don't carry accross invocations becuase they are not put into the settings files at all.  I will address this soon.

But personally, I think having user saveable/loadable settings files AND sim files is confusing, particularly since sim files can pretty much be used instead of settings files.  I may be missing something, in which case I'd love to hear what, but I would like to do away with settings files in the code, in the UI, etc.  It would be less confusing to new users and make the new self-contained setup code I'm working on easier (one less directory to create, etc.)
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Should we do away with settings files?
« Reply #1 on: November 17, 2006, 11:17:30 PM »
I'd like to see the settings files altered in the following ways personally:

1.  Non sim related options should be seperated.  This means things like internet sharing settings, database recording, etc.  They need to be seperate so that people can quickly make different simulations and have them use similar connection settings, or database recording techniques, etc.

2.  Robot DNA files need to be included in the settings file.  This would allow settings and simulations to be shared across users more easily.  At the moment, if a simulation tries to repopulate a veggy that's not in another user's robot files, it crashes.

It would also be nice to be able to load any robots in a sim into your robot folder.

Offline Sprotiel

  • Bot Destroyer
  • ***
  • Posts: 135
    • View Profile
Should we do away with settings files?
« Reply #2 on: November 18, 2006, 11:20:32 AM »
For me, settings files are simulation templates, and therefore a distinct concept from sim files. In concrete terms, if I load and run the same sim 10 times, I expect to get the same outcome every time, while if I do the same with a settings file, I expect 10 different outcomes. Also, the way you use sim files to get settings seems rather contrived to me and I wouldn't really like to have it imposed on me.
I don't much like the idea of hardcoding default settings either.

I agree more or less with Numsgil's points, though I'd find it more practical to keep autosave names in the settings file: it's not something that affects the simulation, but it's still something I like to change every time I start a new one.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Should we do away with settings files?
« Reply #3 on: November 18, 2006, 01:02:52 PM »
It is precisely because settings files are supposed to be sim templates that I think we should unify the two concepts.  Sim files contain everything settings files do plus a lot more.  This more includes both extant organism information and various sim artifacts that are not stored in the settings file today.  Perhaps if we added an option to save a sim without the live state such as the extant bot information or load a saved sim as a 'template' I.e. paused, without the extant organism information...

Shapes and teleporters and internet settings are not saved in settings files today (internet setttings use their own file).  Should they be?  If you say "yes, they are part of what I think of as a sim template" then I would ask besides the extant organism information, what is the difference between a sim and a settings file supposed to be?  We should just use sim files and add whatever load/save options are needed.  If you say "no, I don't think of those things as part of a sim template" then I don't see how a settings file can be thought of as a sim template.

FYI. loading and running the same sim over the same period of cycles 10 times over will not and should not give you the same result each time.  Random numbers are used all over the place - for mutations, for bot placement, etc. - and the seeds are different every time.   DB is nondeterministic by design.

I completely agree with the comments about bot DNA files going into sim files.  I will work on this.

I also agree about non-sim settings being separated to a point, but this is not what settings files are today.

To be clear, the internal defaults I refer to are only used for first time users, replacing default.set, not lastexit.set.  I have some recent settings to add still, but if you change a setting and exit without saving, that change will and should still persist for next time if you start up without a sim.
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Should we do away with settings files?
« Reply #4 on: November 18, 2006, 03:35:02 PM »
Quote from: EricL
FYI. loading and running the same sim over the same period of cycles 10 times over will not and should not give you the same result each time.  Random numbers are used all over the place - for mutations, for bot placement, etc. - and the seeds are different every time.   DB is nondeterministic by design.

This is true only if you don't seed the random number generator.  If you do that, the simulation will run identically on every instance.

However, even seeding a simulation, if you save and reload it, you'll get a different result than if you save and keep running it.  The random number generator loses its current state information and gets "reseeded" back to the start of its sequence.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Should we do away with settings files?
« Reply #5 on: November 18, 2006, 03:49:37 PM »
Quote from: Numsgil
This is true only if you don't seed the random number generator.  If you do that, the simulation will run identically on every instance.

Um, no, it won't.  If you don't specify a seed, the code uses the seconds since midnight as a seed.

EDIT:  Oh, wait.  I misread you.  Right, if you explicitly seed the generator with the same seed each time, then right, yes, you will get repeatability.  Unless you use teleporters cross sim where the timing will be different each time.....  
« Last Edit: November 18, 2006, 03:56:23 PM by EricL »
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Should we do away with settings files?
« Reply #6 on: November 19, 2006, 09:54:35 AM »
Well, I guess it whould be ok if settings doesn't need to be saved separately, but then I whould like every little thing that I set up to be saved when I save the sim, like drifting speed for shapes, shape colors, movement vectors, you name it. That way it whould be easier for you to debug it if someone sends you a sim with an error. But when I start a new sim I whould like just to start the program, go into settings and it should work the same as it does now.  So, I guess I'll vote for maybe.  
« Last Edit: November 19, 2006, 09:55:25 AM by Testlund »
The internet is corrupt and controlled by criminally minded people.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Should we do away with settings files?
« Reply #7 on: November 20, 2006, 10:48:23 AM »
I just use league settings so not really bothered, if a saved sim saves all the settings a setting file saves then I don't see a problem. I also used saved sims instead of setting files when ever I did change the settings.

If it makes DB a bit more streamlined and easier to use, especially for new players, then I don't see it as a problem.

On the other hand, if evo peeps or people who like creating specific settings think it would be a problem then perhaps we should listen to them...
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Should we do away with settings files?
« Reply #8 on: November 26, 2007, 02:22:40 PM »
I want to bring this topic back to the forefront.

Settings files are out of date.  I have not been keeping up with all the new features like I have with sim files.  I bet there are a dozen bugs today where newer settings don't round trip through settings files because I have neglected to add them to the save and load routines for settigns files.  No one seems to have noticed.

As above, sim files contain everything settings file do and more.  I'd really like to do away with settings files completly.  If people want, I'd be happy to implement a "load settings from sim" option would would suck all the settings out of any sim file, but not load the actual bot instances and not start a sim.  If people really demanded it, I could in addition impliment a "Save sim without bots" option to save smaller sim files that would server the role settings files do today.  (Personally I think we don't need that.)

But, I'm tired of having two concepts, two file formats and two bodies of code that do almost exactly the same thing.

Comments?
Many beers....

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Should we do away with settings files?
« Reply #9 on: November 26, 2007, 02:39:33 PM »
Ok the difference between the settings file and a sim file seems pretty simple to me, as in a settings-file you can chance the bots you put in, you can chance mutations of the bots. If anything that could be changed in a settings file could be changed in a sim-file I agree.
Could even be nice if you could chance the mutation rates really harsly in a sim.

So the possibility to add bots.
Well I mean with zerobots I often set pointmutations to the max. Later on I would like to lower these incredebly, even more then is possible on the mutations tab.
There are some settings specifically set only in the settings(I though)so these would also be set in a sim.


But, heh wait isn't a sim is normally started from a settings-file, you're setting the settings for a sim right.   eh, right.
Oh my god, who the hell cares.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Should we do away with settings files?
« Reply #10 on: November 26, 2007, 04:00:42 PM »
I agree with Peter. The best would be if when I load a sim, all the settings in that sim will be loaded into the UI so I can go there and make changes. It's necessary for a zerobot sim. Now I have my own settings template which I use on almost any kind of sim, be it default bots or zerobots that have been running for awhile and can handle the costs. Also I find that when I start a sim with few bots in it, it will be under the treshold where costX is supposed to decrease. This goes so fast that the program thinks the starting costx is 0 instead of 1, which will cause the costx to not kick in until population reaches the treshold where it starts to increase, over 1000 bots! Therefor I like to enter the settings tab when the population reaches above the low treshold and set costx to 1, so the program knows that's the original cost. Just to mension an example why it's important to be able to manipulate the settings under a running sim.
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Should we do away with settings files?
« Reply #11 on: November 26, 2007, 04:01:04 PM »
In addition to my comments in the start of the thread, as long as you're combining things that do the same thing, bot files (.dbo) could be incorporated into the same structure.  They'd just be an empty sim with settings and a single bot in it.

There are a couple of other things that would be nice for simulation files, but these are tangential to the current discussion (but I'll list 'em anyway):

1.   Sim saves in text format, to allow for users to create programs in scripting languages to modify or extract information from sims.  Sprotiel was playing with this once if you remember, but the program was too finicky with how the saves need to be set up.  XML would be a prime candidate.

2.  Sims automatically compressed by the program.  Not sure how this would work with 1 though.  Maybe it just creates a zip with a single file inside it.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Should we do away with settings files?
« Reply #12 on: November 26, 2007, 08:30:42 PM »
Quote from: Testlund
I agree with Peter. The best would be if when I load a sim, all the settings in that sim will be loaded into the UI so I can go there and make changes.
This is exactly what happens today.

Quote from: Testlund
Just to mension an example why it's important to be able to manipulate the settings under a running sim.

To be clear, there is NO DIFFERENCE between the following:

Loading a settings file, adding some bots and hitting Start New.
Loading a sim, deleting all bots, adding the same bots as above and hitting Start New.

Similarly, once I implement the Load Settings From Sim option, there will be NO DIFFERENCE between the following:

Loading a settings file during a running sim and hitting Change.
Loading Settings-From-Sim from a sim file and hitting Change.
Many beers....

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Should we do away with settings files?
« Reply #13 on: November 26, 2007, 08:54:57 PM »
Quote from: Numsgil
In addition to my comments in the start of the thread, as long as you're combining things that do the same thing, bot files (.dbo) could be incorporated into the same structure.  They'd just be an empty sim with settings and a single bot in it.
The code is already unified.  That is, both the sim save routine and the dbo file save routine use the same underlying SaveRobotBody() to serialize a bot.  I have no wish to unify the external concepts as I have no problems with there being a bot file format and a sim file format as they are conceptually different things.  Besides, dbo files are more complex than just a single bot, more complex in ways that sim files are not.  They can contain up to 50 "bots" if the serialzed organism is a mutltibot and there are other differences.  There is special code to deal with such things as tie remapping (You can't re-use the same bot numbers for the cells of an organism in a dbo file as it may not be reloaded into the same sim or into the same sim in time, where you can if you are loading an entire sim).  Same kind of thing for any incubating virus shots the cells may have.  The shot nubmers will be different in any sim the guy gets put into......  

Quote from: Numsgil
1.   Sim saves in text format, to allow for users to create programs in scripting languages to modify or extract information from sims.  Sprotiel was playing with this once if you remember, but the program was too finicky with how the saves need to be set up.  XML would be a prime candidate.
This would indeed be nice but is fraught with problems.  I for one do not want to have to bullet proof the sim read routines (even if XML based) to make them resilient to potentially buggy external changes.   It's hard enough today to make sure the load is the converse of save.  Besides, it is far far down on my priority list.  So far down that I can basically garrentee I will never get to this myself.

Quote from: Numsgil
2.  Sims automatically compressed by the program.  Not sure how this would work with 1 though.  Maybe it just creates a zip with a single file inside it.
I might entertain doing this is a brute force way.  I.e. save, then compress.  Uncompress, then load.
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Should we do away with settings files?
« Reply #14 on: November 26, 2007, 09:02:48 PM »
Quote from: EricL
To be clear, there is NO DIFFERENCE...

Yes, you are right, but it seems to take a little effort to get it to show in the UI. I had to open and close the UI back and forth before the program got it.
The internet is corrupt and controlled by criminally minded people.