LINEAR GENETIC PROGRAMMING

Problem

Evolution Parameters
Choose a preset, then adjust any field. Changed values automatically become Custom.
Populationsearch breadth + parent choice
Program Shapevariable length
Runstandard search or solution repair

Standard starts new random populations. Refine seeds every pool from the current solution, keeps one-edit repair mutations, and preserves failed-case specialists.

Mutationrate + number of edits

Starts at 60% and 1 edit. Improvements cool mutation; stagnation raises both rate and edit count, up to 90% and 4 edits.

Crossovercombines two parents

Mixed randomly chooses one-point, two-point, or uniform crossover. Crossover and mutation are independent.

VM and mutation details
Branch-capable GVM with variable-length programs, lexicase parent selection, a failed-case specialist archive, and solution-seeded refinement. A selected mutation performs one or more edits; each edit is chosen as: 35% operand, 25% replacement, 20% insertion, or 20% deletion. The VM has 14 floating registers, 5 constants, 10 floating memory cells, relative LBL branches, automatic EOL, and 10,000 maximum executed instructions per case.
Live Evolution
GENERATION 0 / 10,000
SPECIFIC DISTANCE—
GENERAL DISTANCE—
FITNESS (0–1)—
POPULATION100
Active evolution settings changes live during adaptive runs
MUTATION —rate — edits · —
CROSSOVER —rate —
RUN MODE — search strategy
SELECTION — parent choice
RECENT FITNESS HISTORY WAITING TO START
Evolution Log

      
Current Solution Waiting for the first population
Start evolution to produce the first solution.
Run Analysis No run analyzed yet
Start evolution to analyze the current solution.
GENERATION—
FITNESS—
SPECIFIC EXACT—
GENERAL EXACT—
AVERAGE STEPS—
ACTIVE CODE—
Current Solution — Live Analysis
Start evolution to see what the current solution is doing well and what is still blocking it.

WHAT IS HOLDING IT BACK

  1. Waiting for a run.

WHAT IS WORKING

  • No solution has been analyzed yet.
Suggested Next Run Waiting for a solution
Suggestions will appear after the first solution is analyzed.
No parameter changes suggested yet.
Changes prepare the next run. They do not alter a run already in progress.
Case Results
No solution analyzed.
No solution analyzed.
Program Activity
No execution activity yet.
The current solution will appear here with execution counts.
MODE STANDALONE GVM IDE Manual program and manual input data
Standalone Program Source
Standalone Input & Controls
Comma-separated values become I[]. Output cells controls O[]. Changing either automatically resets the VM.
BREAKPOINTS Click the round gutter beside an instruction.
Not reset
Machine
NEXT—
IP0
STEPS0
LABELS0
STATUSReady
Virtual Machine Data

INPUT I[]

OUTPUT O[]

CONSTANTS C[0..5]

REGISTERS R[0..13]

MEMORY M[0..9]

Program Debugger

LABEL MAP / VIOLATIONS / BREAKPOINTS

STEP executes one instruction.
RUN executes at full IDE speed until EOL, a breakpoint, or an execution stop.
GVM

Genetic Virtual Machine Reference Summary

Interactive yellow-card edition · branch-capable GVM

FORM GVM-370 · 14 REG · 6 CONST · VARIABLE I/O + MEM · LBL BRANCHES
01

Machine overview

The branch-capable GVM from the older GP design, with corrected jump and comparison behavior.

Programs explicitly read input, manipulate registers and memory, branch through nearby LBL instructions, and write output. No hidden LOAD, STORE, or compare operation is inserted.
INPUT I[]Read-only

Values supplied by the current test case.

CONSTANTS C[]6 values

C[0] is input count; C[5] is output count; C[1..4] are 1, 0, −1, and 2.

REGISTERS R[]14 floats

Hold counters and indirect indexes.

MEMORY M[]10 floats

Working values, arithmetic, comparisons, and copies.

OUTPUT O[]Variable size

SET copies a memory value directly to output.

LABELSRelative targets

Branches count LBL markers forward or backward.

02

Data flow

Registers select input, memory, and output positions.

INPUT I[]case values
GET→
MEMORY M[]ADD · M2M · NOT
SET→
OUTPUT O[]program result
GET a,b
M[R[b]] ← I[R[a]]

Invalid or non-integer indexes are rejected rather than wrapped.

SET a,b
O[R[b]] ← M[R[a]]

The older branch VM copies the floating value directly; it does not round.

03

Indirect addressing

The operands name registers; the register contents name data cells.

GET 2,5
means
M[R[5]] ← I[R[2]]
1

If R[2] contains 1, the source is I[1].

2

If R[5] contains 3, the destination is M[3].

3

GET copies I[1] into M[3].

InstructionMeaning
LDC c,rR[r] ← C[c]
R2R a,bR[b] ← R[a]
M2M a,bM[R[b]] ← M[R[a]]
ADD a,bM[R[b]] ← M[R[b]] + M[R[a]]
04

Instruction explorer

Select an opcode to see its corrected behavior.

LDC c,rREGISTER

Loads one of the five machine constants into a register.

R[r] ← C[c]
LDC 1,4 loads constant 1 into R[4].
05

Conditional branching

Branches use signed relative label counts, not encoded bytes or raw line offsets.

BGT a,b,j
if M[R[a]] > M[R[b]] → LBL j

Corrected to compare the data values selected by the registers, making input-dependent decisions possible.

BLE a,b,j
if M[R[a]] ≤ M[R[b]] → LBL j

Branches when the selected memory values are already in non-descending order.

BRN a,j
if R[a] ≠ 0 → LBL j

Useful for register counters and loops.

BR j
always → LBL j

An unconditional branch.

j = +1next LBL below
j = +2second LBL below
j = −1previous LBL above
j = −2second LBL above
Jump operands are stored directly as signed integers. Zero is invalid. A branch whose requested label does not exist stops with INVALID BRANCH.
06

Execution rules

Reset, run, and stop behavior.

1

Set C[0] to the current input count, C[5] to the current output count, and C[1..4] to 1, 0, −1, and 2.

2

Clear all registers, memory, output, violations, and the instruction count.

3

Scan the program and record every LBL position.

4

Begin at instruction zero and execute until EOL, invalid branch, or 10,000 instructions.

5

Breakpoints pause before the selected instruction executes.

Stop reasonMeaning
EOLThe instruction pointer passed the final program instruction.
INVALID BRANCHThe requested forward/backward label does not exist.
MAX EXECUTIONThe program reached the 10,000-instruction safety limit.
BREAKPOINTThe IDE paused before executing a marked line.
07

Conditional maximum example

Write the larger of two input values to O[0] without a swap instruction.

0 CLR 0
1 CLR 1
2 GET 0,0
3 INC 0
4 INC 1
5 GET 0,1
6 DEC 0
7 BLE 0,1,+1
8 BR +2
9 LBL
10 M2M 1,0
11 BR +1
12 LBL
13 SET 0,0
14 EOL
GET

Load the two inputs into M[0] and M[1].

BLE

If M[0] is less than or equal to M[1], branch to the copy path.

M2M

Copy M[1] into M[0] only when the second input is larger.

SET

Write the selected maximum value to O[0].