Author Topic: Bot color as output and debugging tool  (Read 3689 times)

Offline PhiNotPi

  • Bot Builder
  • **
  • Posts: 64
    • View Profile
Bot color as output and debugging tool
« on: July 21, 2011, 09:57:36 AM »
Today I was thinking about AI when I wondered how a bot could communicate with the outside world.  It would be easier to observe and debug the bot if you had some sort of indicater as to what the bot is thinking about.  I propose that we add a way for bots to change their color on command.  There are several uses for this:

  • You can have different parts of a multibot change to different colors.  This adds a visual effect, and can be useful to make sure all of the robots are doing the right thing and becoming the right part of the multibot.
  • Have the bot change colors when doing different things.  This also adds a visual effect and is also useful when making sure the robot is in the right "mode" of operation
  • As a debugging tool. You can program the bot so that it turns red if a certain gene activates, for example

Here are two ways to implement this:
  • Create a memory location for the color. The value is the color, with 0 = red and 32000 = purple.  This value does NOT reset after each cycle. There should be a way to turn this feature on and off.
  • Create three memory locations.  They are the red, green, and blue values for the color.  These memory locations do NOT reset after each cycle. There should be a way to turn this feature on and off.
This second option has an advantage over the first option. It is possible to debug/observe three things at once.  You have the bot that turns red if gene 1 activates, green if gene 2, and blue if gene 3.  If it turns black, you would then know that all three genes activated.  The first option, however, will only return blue, and you do not know whether genes 1 or 2 activated or not.
« Last Edit: July 21, 2011, 10:36:10 AM by PhiNotPi »
I am biased neither towards nor against any single mathematical constant.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Bot color as output and debugging tool
« Reply #1 on: July 21, 2011, 02:11:21 PM »
The thing with color has always been that, while color is meaningful to humans, it's not particularly meaning to bots above and beyond just another in/out pair.

Still, it would be a really useful debugging tool, etc.  I like the idea of being able to hook up either specific actions or specific sysvars (in/out) to a color readback.  Right now bot color is related to genetics, but it wouldn't be too hard to create a dialog box and let users have color come from other sources.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Bot color as output and debugging tool
« Reply #2 on: August 14, 2011, 12:57:11 PM »
How about we use the good old gene activations chart and mod it (optionally) to see behavior similar to gene activations.

Like for example: The One can be completely rewritten to use genes. All we have to do is calculate it and display it (this is where Prsn828s work would really help)

(note: I am doing 9 generations of mutations (my current restart) and I still got no gene structure usage)

oh I see,  the advantage of the system proposed above is the fact that we can see all activations (or atleast three) for all the robots at once.

ok, good one...

P.S..

How about we also add a "most changing(activation wize) gene per 1000 cycles" finder???
« Last Edit: August 15, 2011, 02:16:01 PM by Botsareus »

Offline PhiNotPi

  • Bot Builder
  • **
  • Posts: 64
    • View Profile
Re: Bot color as output and debugging tool
« Reply #3 on: February 12, 2014, 06:43:50 PM »
Even though it has been two and a half years since I first suggested this, I still think that this is a change worth implementing.  It would allow for easier debugging (especially for multibots), and would allow easier visualization.

For example, we could create a checkbox setting called "allow robots to change color."  If enabled, then the robots would be able to change their color by writing to a specific sysvar.
I am biased neither towards nor against any single mathematical constant.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Bot color as output and debugging tool
« Reply #4 on: February 13, 2014, 05:32:54 PM »
Try Debugint with the debug button on the robot console, it even returns a more precise value then the color, your eye can not judge color very well as you may be aware. If you need this for virus stuff, I'll drop you that chloroplast fix asap.

All you need to do is when debugging to insert debugint into the code you have.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Bot color as output and debugging tool
« Reply #5 on: February 13, 2014, 05:46:49 PM »
Actually here you go, I made up my mind - looks like I am going no where with that vote fast, a little expansion where you can set repopulating robots to load with some chloroplasts, it is a compromise, but it is sure better then what we had before imo.