config¶
A module containing all variables that modify the behaviour of most modules.
entity¶
-
config.start_amount= 15¶ Amount of entities to first spawn.
-
config.start_size= (30, 40)¶ A random interval of the start size of entities.
-
config.start_speed= (3, 6)¶ A random interval (min, max) of the start speed of entities
-
config.start_energy= 200000¶ How much energy the entities start with.
-
config.energy_drain_formula= '0.3*speed*size'¶ How much energy is drained each turn, depending on speed and size.
-
config.mating_chance= 0.1¶ The odds of a mating occurring when two entities collide.
-
config.mating_counter_roof= 2000¶ How big the mating counter has to be to mate.
-
config.mating_age_counter_roof= 800¶ How big the age counter has to be to mate (how old the entity has to be).
-
config.mating_energy_formula= '0.25*energy'¶ How much energy is drained from a parent, dependent on energy.
-
config.mating_energy_formula_min= 1000¶ The minimum energy drain from a parent (for when the parent’s energy is too low to be transferred proportionally).
-
config.speed_variation= (2, 4)¶ A random interval of how much the average of the parents’ speed genes are shifted.
-
config.size_variation= (2, 4)¶ A random interval of how much the average of the parents’ size genes are shifted.
-
config.direction_counter_increment= (1, 10)¶ A random interval of how much the direction counter is incremented by.
-
config.direction_counter_roof= 100¶ How big the direction counter has to be to change direction.
-
config.min_speed= 1¶ Minimal speed for an entity. If the entity speed is lower than this, it is automatically set to this value.
-
config.min_size= 1¶ Minimal size for an entity. If the entity size is lower than this, it is automatically set to this value.
-
config.entity_image= 'entity.png'¶ Image of the entity.
food¶
-
config.food_size= 10¶ How big a food sprite is.
-
config.food_amount= 10¶ How many food sprites are spawned each turned.
-
config.food_energy= 5000¶ How much energy each food sprite gives.
-
config.food_spawn_counter_roof= 200¶ How big the counter has to be to spawn the food.
-
config.food_spawn_counter_increment= (2, 5)¶ A random interval of how much the spawn_counter is incremented by.
-
config.food_image= 'food.png'¶ Image of the food.
marker¶
-
config.starve_marker_duration= 22¶ How long the starve marker stays up.
-
config.starve_marker_color= (255, 0, 0)¶ Color of the starve marker.
-
config.birth_marker_duration= 22¶ How long the birth marker stays up.
-
config.birth_marker_color= (0, 255, 0)¶ Color of the birth marker.
graph¶
-
config.statistics_counter_roof= 100¶ In seconds, how big the statistics counter has to be to save the current values of the entities’ genes.
-
config.var_translation= {'amount': 'antal', 'energy': 'energi', 'size': 'storlek', 'speed': 'hastighet'}¶ Translation for evolution variables.
-
config.scaled_vars= {'energi': 1000}¶ Variables that should be scaled. The new var will be the old var divided by these values.
-
config.ylims= {'antal': 300, 'energi': 200, 'hastighet': 10, 'storlek': 40}¶ Max y limits for the graphs.
-
config.axis_labels= {'antal': 'Antal', 'energi': 'Energi (i tusental)', 'hastighet': 'Hastighet', 'storlek': 'Storlek', 'x': 'Tid (s)'}¶ Labels of the x and y axis.
-
config.avg_tables= True¶ If a .txt file containing the data points of an average graph should be generated.
-
config.run_title_format= 'KEY, körning RUN'¶ Title format of a run graph.
-
config.run_fname_format= 'RUN, KEY'¶ File name format of a run graph.
-
config.avg_title_format= 'KEY, medelvärde'¶ Title format of an average graph.
-
config.avg_fname_format= 'KEY, medelvärde'¶ File name format of an average graph.
-
config.avg_table_fname_format= 'KEY'¶ File name format of an average graph table file.
-
config.avg_table_data_format= 'X,Y'¶ Data format of an average graph table file.
-
config.remove_non_statistics= True¶ Delete non-statistics files after making the graphs.
gui¶
-
config.manual_dims= (1540, 863)¶ (width, height) of the GUI.
-
config.fps= 60¶ Frames per second. Idealized value. In reality, it will become smaller due to the program bottlenecking.
-
config.window_roof_offset= 31¶ Pixels that the window roof is shrunk down by.
-
config.window_floor_offset= 40¶ Pixels that the window floor is elevated by.
-
config.border_roof_offset= 18¶ Pixels that the border rect roof is shrunk down by.
-
config.border_left_offset= 14¶ Pixels that the border rect is shifted to the right by.
-
config.border_width_factor= 0.99¶ Ratio of (border width)/(window width).
-
config.border_height_factor= 0.98¶ Ratio of (border height)/(window height).
-
config.border_thick= 3¶ Border rect line thickness.
-
config.border_color= (255, 255, 255, 255)¶ Border rect color.
spreadsheet¶
-
config.enable_spreadsheet= True¶ Enables spreadsheet.exe to be run from
graph. This does not mean it can’t be run manually though!
-
config.spreadsheet_name= 'spreadsheet'¶ File name of the spreadsheet.
-
config.to_queue= ('val1', 'val2', 'val3', 'val4', 'hastighet', 'storlek')¶ .txtfiles to make table(s) out of.
-
config.spreadsheet_vars= ('hastighet', 'storlek')¶ Variables to use in the tables.
-
config.spreadsheet_x_column= 'Tid (m)'¶ Title of the spreadsheet x column.
-
config.spreadsheet_format= {'align': 'center', 'bold': True, 'fg_color': '#399ee6', 'valign': 'vcenter'}¶ The main spreadsheet format for title cells (other cells have formats instantiated at runtime)