How To Use Scriptbots - GhengopelALPHA/scriptbots GitHub Wiki

This page assumes you have installed Scriptbots and launched it without errors. You should see a command prompt window, a GUI handling several options and actions, and a main window where the simulation takes place.

NOTE: Closing any one of these windows will close Scriptbots!

Keybindings

  • [esc]: Naturally close Scriptbots and all associated windows.
  • [p]: Toggle pause. All non-drawing elements of the sim are frozen when paused.
  • [m]: Toggle fast mode. All drawing elements of the sim are frozen. The sim will continue to process everything else, effectively speeding up the sim to its maximum potential.
  • [q]: Centers the scene on the entire world and the population graphs instantly, for any window size or shape.
  • [+]/[-]: These will speed up and slow down the simulation (respectively) by skipping drawing some frames. Similar to fast mode, but not as fast and changes are still visible (FPS is unsmoothed however)
  • [k]/[l]: Switch layer visualization. These will cycle through all the available layers of the world which can be drawn. Presently includes plants, fruit, meat, hazard, terrain, and none.
  • [z]/[x]: Switch agent visualization. These will cycle through all the available bot color schemes. Presently included RGB, stomach, temp discomfort, vocalization, species ID, relation to selected, health, and none.
  • [>]/[<]: Zoom in and out (respectively). Effectively [shift]+[,] and [shift]+[.]
  • [c]: Toggle closed world. A closed world will not add random bots and will not spawn random plants (except fruit).
  • [f]: Follow selected agent. The bot which is currently selected will always be centered in the main window.
  • [delete]: Delete the selected bot.
  • [/]: Heal the selected bot.
  • [|]: Force selected bot to assexually reproduce. Effectively [shift]+[\]
  • [spacebar]: Activate player input in selected bot. A dedicated brain input will become 1 when the spacebar is hit or held.
  • [w]: Activates manual drive mode if not active already. Once in manual drive mode, will increase speed on both left and right wheels and try to go straighter.
  • [s]: Activates manual drive mode if not active already. Once in manual drive mode, will decrease speed on both left and right wheels.
  • [a]: Activates manual drive mode if not active already. Once in manual drive mode, will increase left-turn tightness.
  • [d]: Activates manual drive mode if not active already. Once in manual drive mode, will increase right-turn tightness.

Context Menu

Right-clicking anywhere in the main window world space will pull up a context menu, where several options can be accessed, including some with keybinds and others without.

  • Control Selected: Toggles manual drive mode without changing custom wheel speeds (default speeds are zero on both wheels).
  • Heal Agent and Delete Agent: they do this to the selected bot
  • Spawn Agents: Spawn 5 random bots into the world, regardless of closed state or number of agents already present.
  • Spawn Herbivores: Spawn 5 random herbivorous agents into the world.
  • Spawn Carnivores: Spawn 5 random carnivores.
  • Spawn Frugivores: Spawn 5 random frugivores.
  • Toggle Closed: toggles the closed state of the sim, preventing new random agents from spawning.
  • Save World: pauses the sim and opens GUI to save the current simulation. Recommend use of ".SCB" file extension, but technically no file extension is required.
  • Load World: pauses the sim and opens GUI prompting for a real file name in the /saves directory, which upon discovery will be loaded into the sim.
  • Enter Debug Mode: Toggles several bug-reporting features, including drawing lines of sight and ranges of various features on the selected bot, verbose command prompt reports, and other development tools.
  • Reset Agents: The world will reset to its random initial state, bots will be cleared and respawned up to 30, and the report record will be cleared. Works exactly like [tab].
  • Reset Config: Forces a new config file with default values to be generated. Erases any old config file.
  • Exit: Naturally close Scriptbots and all associated windows. Works exactly like [esc].

GUI Window

Scriptbots now launches with a UI in a separate window that allows several features, most available with keystrokes or the right-click menu, but in a convenient, graphically represented display.

  • Closed World: Toggle closed world. A closed world will not add random bots and will not spawn random plants. Works exactly like [c].
  • Pause: Toggle pause. All non-drawing elements of the sim are frozen when paused. Works exactly like [p].
  • Allow Autosaves: If you are having problems with the program crashing during long-period simulations, having this on will make the program save the simulation once every epoch to AUTOSAVE.SCB, which can then be used to debug the program. Please forward any such erroneous saves to [email protected], and I'll try to fix the issue. Otherwise, disable, because it does cause lag with the program.
  • Load World: This button pulls up another window for loading a file from a given file name. Works exactly like the right-click menu's "Load World" function.
  • Save World: This button pulls up another window for saving the world to a file with the given file name. Works exactly like the right-click menu's "Save World" function.
  • New World: This button resets the world to its initial state and clears all bots, and spawns 30 new ones. Works similarly to the right-click menu's "Reset Agents" function, except it also erases all cell data and generates new terrain.
  • Speed Control / Fast Mode: The numerical value effects how many frames are skipped when rendering, and enabling fast mode disables all rendering, putting all resources into pure simulation.
  • Visuals: These options change the current visualization scheme of the cell layer and the agents. Mostly self-explanatory for the cell layers. Agent visuals include pure RGB; Stomach type, where green are herbivores, yellow are frugivores, and red are carnivores; (temperature) Discomfort, where blue is comfy and orange is hazardous; Volume, which draws "waves" indicating both the volume (range) and tone (color) of agents, where red is low-frequency, green is mid-tone, and blue is high-pitched; Species ID, a simple 3-dimension coloring of agents based on their genome value inputed to three sine functions - should produce unique colors for unique species; Crossable, which shows the relation of all agents to the selected one, where grey are not related, purple are related but not crossable (sex reproduction), navy blue are crossable, and light-blue are identical (all based on Species ID); and Health, which shows green for healthy agents, but starts blinking orange when they get low health. Faster blinking indicates faster health loss.
  • Selection: Allows the user to chose the method of agent selection. Note that at any time the user may override this (set it to manual) by clicking on any agent. Oldest picks the oldest, Best Gen picks the agent with the highest generation counter, Healthiest attempts to follow the bot with the most health (be wary, it jumps around a lot for large populations), Productive chooses the agent that's had the largest number of children per age, Aggressive shows the agent that has stabbed, bitten, or killed the most, and Social picks the agent with the highest give and projection outputs. As a helper option, you may toggle following of the selected agent, but such actions as clicking and dragging the world, pressing "q", or the death of your selected agent will disable following. Finally, you can choose to save the selected agent to a file; however, functionality to bring such saved agents back to life does not yet exist.
  • DEBUG: toggles the debug state of the sim, including drawing lines of sight and ranges of various features on the selected bot, verbose command prompt reports, and other development tools.