From 7aa13929e1aacd5191bccb64150e9deaba54eb93 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 20 Feb 2026 12:14:20 +0000 Subject: [PATCH] [DOCS] Overhaul settings.ini with clear sections and Plain English explanations This commit rewrites the `settings.ini` configuration file to improve its documentation quality. It organizes settings into logical sections, uses Plain English to explain each parameter, and standardizes the formatting. These changes make the tool more accessible to a global audience while preserving all existing configuration logic and values. Co-authored-by: RainRat <20098977+RainRat@users.noreply.github.com> --- settings.ini | 226 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 136 insertions(+), 90 deletions(-) diff --git a/settings.ini b/settings.ini index b99512d..ae492a2 100644 --- a/settings.ini +++ b/settings.ini @@ -1,91 +1,137 @@ [DEFAULT] -#size, cycles, processes, length, distance - -##archived 0-3 Global Masters -## 0 GM 1 8000, 80000, 64, 100, 100 -## 1 GM 2 160, 1600, 160, 6, 6 -## 2 GM 3 8000, 80000, 8000, 80, 80 #and use SANITIZE 9 -## 3 GM 4 800, 8000, 4, 20, 20 -## - -# 0 Nano 80, 800, 80, 5, 5 -# 1 Tiny 800, 8000, 800, 20, 20 -# 2 Tiny LP 800, 8000, 8, 50, 50 -# 3 94 Medium P 8000, 80000, 64, 100, 100 -# 4 94/Std/NOP 8000, 80000, 8000, 100, 100 -# 5 94 LP 8000, 80000, 8, 100, 100 -# 6 Tourney 8192, 100000, 8000, 300, 300 -# 7 Experimental 55440, 500000, 10000, 200, 200 - -LAST_ARENA=7 -#A LAST_ARENA of 7 means you are running 8 arenas -CORESIZE_LIST=80,800,800,8000,8000,8000,8192,55440 -SANITIZE_LIST=80,800,800,8000,8000,8000,8192,55440 -#usually the same as above but may be needed for arenas like Global Masters Round 3. -CYCLES_LIST=800,8000,8000,80000,80000,80000,100000,500000 -PROCESSES_LIST=80,800,8,64,8000,8,8000,10000 -WARLEN_LIST=5,20,50,100,100,100,300,200 -WARDISTANCE_LIST=5,20,50,100,100,100,300,200 - -NUMWARRIORS=500 -ALREADYSEEDED=True -################# Set to False on first or it will not work. -CLOCK_TIME=24.0 -#actual wall clock time in hours you want to take - -VERBOSE=False -#Set to True to see detailed mutation and battle output - -BATTLE_LOG_FILE=battle_log.csv -#log file to study progress. leave blank for no log - -FINAL_ERA_ONLY=False -#if True, skip the first two eras and go straight to the last one(i.e. if you want to continue fine-tuning where you left off) -#Or you're doing other research into the parameters and don't want them changing. - -#Five strategies for mutating a single instruction. Think of it like a bag of marbles of six different colours, and a different number of each colour. - -NOTHING_LIST=10,18,27 -#one of the colours of marbles will do nothing to the instruction -RANDOM_LIST=2,1,1 -#This colour of marbles will create a completely random instruction. -NAB_LIST=4,4,2 -#This will nab an instruction from a different arena. (Set to 0 if you are only running one arena.) -MINI_MUT_LIST=3,4,2 -#This will do a mini mutation. (One part of the instruction replaced with something random.) -MICRO_MUT_LIST=3,4,3 -#This will do a micro mutation. (One of the numbers in the instruction increased or decreased by 1.) -LIBRARY_LIST=6,2,1 -#LIBRARY_LIST=0,0,0 -#This will grab an instruction from the instruction library (not included). (Set to 0 if you haven't made a library.) -MAGIC_NUMBER_LIST=3,3,2 -#This will replace a constant with the magic number (chosen at beginning of warrior) - -#my intuition is that at first, unarchiving should be rare: -#-if sharing archive with other runs, will allow unique adaptations to optimize before turning optimized warriors loose -#later on, unarchiving should be more common: -#-plenty of archived warriors to cycle through -ARCHIVE_LIST=2000,3000,3000 -UNARCHIVE_LIST=4000,2000,1000 -#ARCHIVE_LIST=0,0,0 -#UNARCHIVE_LIST=0,0,0 - - -#******* Not included with distribution. You do not need to use this. *********** -LIBRARY_PATH=instructions.txt -#instructions to pull from. Maybe a previous evolution run, maybe one or more hand-written warriors. -#one instruction per line. Just assembled instructions, nothing else. If multiple warriors, just concatenated with no breaks. - - -CROSSOVERRATE_LIST=10,2,5 -# 1 in this chance of switching to picking lines from other warrior, per instruction -TRANSPOSITIONRATE_LIST=10,12,20 -# 1 in this chance of swapping location of multiple instructions, per warrior - -BATTLEROUNDS_LIST=1,20,100 -PREFER_WINNER_LIST=True, False, False - -#Biasing toward more viable warriors. Most popular instructions more likely. -INSTR_SET=MOV,MOV,MOV,MOV,MOV,MOV,MOV,MOV,MOV,MOV,SPL,SPL,SPL,SPL,SPL,DJN,DJN,DJN,DJN,ADD,SUB,MUL,DIV,MOD,JMP,JMZ,CMP -INSTR_MODES=#,$,*,@,{,<,},> -INSTR_MODIF=A,B,AB,BA,F,X,I +# ============================================================================= +# Python Core War Evolver - Configuration +# ============================================================================= +# This file controls how the evolution process works. You can change these +# settings to experiment with different evolution strategies. + +# ----------------------------------------------------------------------------- +# 1. Basic Setup +# ----------------------------------------------------------------------------- + +# How many hours you want the evolution to run. +# You can stop it early at any time by pressing Ctrl+C. +CLOCK_TIME = 24.0 + +# How many warriors to keep in each arena's population. +# Higher numbers provide more variety but take longer to evolve. +NUMWARRIORS = 500 + +# Set this to False to start a new evolution from scratch. +# When True, the program will try to resume from existing files. +# Tip: You can also use the --restart flag on the command line to start over. +ALREADYSEEDED = True + +# The name of the file where battle results are saved. +# Leave this blank if you do not want to keep a log. +BATTLE_LOG_FILE = battle_log.csv + +# If True, the evolution starts immediately in the final Optimization phase. +# Useful if you want to fine-tune your best warriors without starting over. +FINAL_ERA_ONLY = False + +# Set to True to see detailed information about every mutation and battle. +VERBOSE = False + +# ----------------------------------------------------------------------------- +# 2. Arena Configuration +# ----------------------------------------------------------------------------- +# You can run multiple evolution environments (Arenas) at the same time. +# Each arena can have its own rules, like memory size or battle length. + +# The highest numbered arena you want to run. +# For example, if you want 8 arenas (0 through 7), set this to 7. +LAST_ARENA = 7 + +# The settings below MUST have one value for each arena, separated by commas. +# If LAST_ARENA is 7, each list below must have 8 values. + +# Memory size of the virtual computer. +CORESIZE_LIST = 80, 800, 800, 8000, 8000, 8000, 8192, 55440 + +# Used to clean up memory offsets. Usually the same as CORESIZE. +SANITIZE_LIST = 80, 800, 800, 8000, 8000, 8000, 8192, 55440 + +# Maximum number of instructions a program can execute before a draw is called. +CYCLES_LIST = 800, 8000, 8000, 80000, 80000, 80000, 100000, 500000 + +# Maximum number of simultaneous processes a warrior can have. +PROCESSES_LIST = 80, 800, 8, 64, 8000, 8, 8000, 10000 + +# Maximum allowed length of a warrior (in instructions). +WARLEN_LIST = 5, 20, 50, 100, 100, 100, 300, 200 + +# Minimum distance between warriors when the battle starts. +WARDISTANCE_LIST = 5, 20, 50, 100, 100, 100, 300, 200 + +# ----------------------------------------------------------------------------- +# 3. Evolution Phases (Eras) +# ----------------------------------------------------------------------------- +# The evolution moves through three phases: 1. Exploration, 2. Breeding, 3. Optimization. +# Settings ending in _LIST below must have exactly 3 values. + +# The "Marble Bag" Strategy: +# When creating a new warrior, the tool picks a mutation type from a "bag". +# The numbers below determine how many of each "marble" (mutation type) are in the bag. +# Higher numbers make that mutation more likely to happen. + +# Do nothing (keeps the parent's instruction exactly as it is). +NOTHING_LIST = 10, 18, 27 + +# Create a completely random instruction. +RANDOM_LIST = 2, 1, 1 + +# Borrow an instruction from a warrior in a different arena. +NAB_LIST = 4, 4, 2 + +# Change one part of an instruction (like an opcode or value). +MINI_MUT_LIST = 3, 4, 2 + +# Adjust a memory offset by exactly 1. +MICRO_MUT_LIST = 3, 4, 3 + +# Pull an instruction from the library file (defined in LIBRARY_PATH). +LIBRARY_LIST = 6, 2, 1 + +# Apply a consistent "magic number" to memory offsets. +MAGIC_NUMBER_LIST = 3, 3, 2 + +# Saving and loading from the archive: +# These control how often warriors are moved to or from the long-term archive. +ARCHIVE_LIST = 2000, 3000, 3000 +UNARCHIVE_LIST = 4000, 2000, 1000 + +# ----------------------------------------------------------------------------- +# 4. Genetic & Battle Settings +# ----------------------------------------------------------------------------- + +# The probability of switching parents during breeding (1 in N chance per instruction). +CROSSOVERRATE_LIST = 10, 2, 5 + +# The probability of swapping the location of instructions (1 in N chance per warrior). +TRANSPOSITIONRATE_LIST = 10, 12, 20 + +# Number of rounds to fight in each battle. +# High numbers are more accurate but take much longer. +BATTLEROUNDS_LIST = 1, 20, 100 + +# If True, the winners of battles are given priority for breeding. +PREFER_WINNER_LIST = True, False, False + +# ----------------------------------------------------------------------------- +# 5. Redcode Language Settings +# ----------------------------------------------------------------------------- + +# The path to a file containing a list of successful instructions. +# This is optional. If you don't have one, set LIBRARY_LIST to 0,0,0. +LIBRARY_PATH = instructions.txt + +# The set of instructions used when creating random code. +# Repeating an instruction (like MOV) makes it more likely to be chosen. +INSTR_SET = MOV,MOV,MOV,MOV,MOV,MOV,MOV,MOV,MOV,MOV,SPL,SPL,SPL,SPL,SPL,DJN,DJN,DJN,DJN,ADD,SUB,MUL,DIV,MOD,JMP,JMZ,CMP + +# The addressing modes available to the warriors. +INSTR_MODES = #,$,*,@,{,<,},> + +# The instruction modifiers available to the warriors. +INSTR_MODIF = A,B,AB,BA,F,X,I