Author Topic: Architecture expension while keeping the program object orianted.  (Read 814 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
So this is more of a question than a suggestion.

In DB2 I created something like "fitness functions"
Basically they calculate a variables based on properties of a group of robots using a special formula. Currently this variables are saved global as they cause a 'simulation state' and need to save as part of the simulation.

A group of robots are added a handicap to there energy or body based on these variables.

Also, a group of robots is not always executed. You can say there state is in 'suspended animation' until a counter (also a collection of global variables currently) lets them return to a simulation.

I guess this is a continuation of my question from off topic. How would I program something like this in DB3 so the DB3 architecture play nice with it?

Offline Testlund

  • Bot God
  • *****
  • Posts: 1573
    • View Profile
    • Games And Electronica
Re: Architecture expension while keeping the program object orianted.
« Reply #1 on: March 31, 2016, 04:11:18 PM »
Hmmn... Is this something you've already added to DB or is it in the planning stage? I'm a bit concerned about favoring some bots over others with a handicap, that it defeats the purpose of true evolution.
"God is an ever receding pocket of scientific ignorence." - Neil DeGrasse Tyson

"God is a kid with an ant farm" - Constantine

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Architecture expension while keeping the program object orianted.
« Reply #2 on: March 31, 2016, 04:52:43 PM »
Testlund, this stuff happens ONLY if you go into Settings > Global Settings > Evolution > Simple survival mode or Eco survival mode. Then the program will restart itself, populate robots and all that good stuff. I even got an option to run eco survival mode in combination with IM. Which hopefully I will start doing in a couple of months after making sure the IM gremlins don't come back. At some point actually I would like you to try it so I would not be the only one on IM running it, and other users too. But this is completely optional and does NOT activate under normal conditions. I do seem to recall that you had problems of making the program restart itself before, I even made some YouTube vids to help you out. You said you got it work after our session.

It actually does not favor individual bots, only a species of bots. Because the algorithm does not know what "better" is. It can only collect measurements such as population, body, and energy. It works quite well actually.
« Last Edit: March 31, 2016, 04:55:58 PM by Botsareus »

Offline Testlund

  • Bot God
  • *****
  • Posts: 1573
    • View Profile
    • Games And Electronica
Re: Architecture expension while keeping the program object orianted.
« Reply #3 on: March 31, 2016, 05:16:19 PM »
Testlund, this stuff happens ONLY if you go into Settings > Global Settings > Evolution > Simple survival mode or Eco survival mode.

Forget my concern then. It's always nice to have options.  :)

Quote
At some point actually I would like you to try it so I would not be the only one on IM running it, and other users too. But this is completely optional and does NOT activate under normal conditions. I do seem to recall that you had problems of making the program restart itself before, I even made some YouTube vids to help you out. You said you got it work after our session.

Yeah, I just now looked through old threads to refresh my memory about the global settings, because I haven't played with DB for months. I'll see if I can do some testings with your survival mode settings.
"God is an ever receding pocket of scientific ignorence." - Neil DeGrasse Tyson

"God is a kid with an ant farm" - Constantine

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Architecture expension while keeping the program object orianted.
« Reply #4 on: March 31, 2016, 05:27:26 PM »
This is getting rather off topic but:

If you do, when you get it running click on Help Menu (On the menu bar) > Survival Info. To view the calculation currently being applied to the red robots.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1573
    • View Profile
    • Games And Electronica
Re: Architecture expension while keeping the program object orianted.
« Reply #5 on: March 31, 2016, 09:05:17 PM »
I will test it tonight. I'll start a new thread about it later.
"God is an ever receding pocket of scientific ignorence." - Neil DeGrasse Tyson

"God is a kid with an ant farm" - Constantine

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
Re: Architecture expension while keeping the program object orianted.
« Reply #6 on: April 01, 2016, 04:49:58 PM »
How would I program something like this in DB3 so the DB3 architecture play nice with it?

In the distant future, probably stuff like this would go in a script (lua or C# or python or maybe the DNA language itself) that you'd load up that would control the flow of things and modify the simulation state after certain conditions.  Basically a lot like how mods work for a lot of modern games: they sort of stomp over the scripts that ship with the base game, injecting their changes in directly.  At the simplest a straight replace of the entire file, but you could also do diff based merging so you could merge different changes to the same file as long as they don't overlap.

In the slightly less distant future, you'd have to add some code to wherever the simulation loop would be to grab all the robots and do something to them.  The more of these sorts of features you add, the longer the simulation loop code gets, so it doesn't scale very well as you add more features.

But none of that code is written yet, so the answer might very well change as things flesh out.  But top level features like this aren't that hard to figure out.  Harder stuff would be like pausing the simulation to debug the DNA execution of a robot line-by-line, because then you have to figure out how to sync up the simulation thread with the UI thread without creating a hard dependency between them, which means things like async handlers holding on to closures, and keeping all that from becoming a ripe mess.  It's always the harder to do subtler features than to do straightforward ones, because the subtle features touch a lot of systems at the same time.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Architecture expension while keeping the program object orianted.
« Reply #7 on: April 01, 2016, 05:18:54 PM »
Quote
they sort of stomp over the scripts that ship with the base game, injecting their changes in directly.

I do not think we have to go that far. If anything if a person wants to mod the game they should just go get the source code since it is an open source project. But cool idea anyway.

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
    • OurIllogicalWorld Blog
Re: Architecture expension while keeping the program object orianted.
« Reply #8 on: April 07, 2016, 05:53:01 AM »
Quote
they sort of stomp over the scripts that ship with the base game, injecting their changes in directly.

I do not think we have to go that far. If anything if a person wants to mod the game they should just go get the source code since it is an open source project. But cool idea anyway.
But then again, I've played an open source >game< which had plugins...which was quite nice because it meant I didn't have to do complete reinstall and I could install any variety I liked without technical know-how
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.