Repository navigation
xor_bench: name champion checks by state reset; add reset variants and tuning keys - #123
Merged
Merged
Conversation
…d tuning keys The SUMMARY check `still_solved_reversed_order` evaluated the reversed patterns without resetting the CTRNN state, which its name did not say. The checks are now named after what they do: - reproduced_as_trained (was reproduced_same_order): training order and training reset setting - still_solved_reset_each (unchanged) - still_solved_reversed_no_reset (was still_solved_reversed_order) - still_solved_reversed_reset_each (new) - still_solved_all_orders_reset_each (new: all 24 orders) The usage text (printed without arguments) documents every mode, key and check. New keys for the MutationConfig fields the bench lacked, defaults unchanged: xavg, surv, champ, splitw, splitb, step, integ, out, stag, elit, reeval. The bench code moves to examples/xor_bench_common so that tests/xor_bench_tests.rs can test it. Bench A (seeds 1/101/201/301) is unchanged: 50/50 solved, medians 52/53/53/51. ref #106 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
still_solved_reversed_orderevaluated the reversed patterns without resetting the CTRNN state, so it reported e.g. 42/50 even withreset=1, and its name did not say so. The SUMMARY champion checks are now named after whether they reset state:reproduced_as_trained(wasreproduced_same_order)reset=)still_solved_reset_eachstill_solved_reversed_no_reset(wasstill_solved_reversed_order)still_solved_reversed_reset_each(new)still_solved_all_orders_reset_each(new)The per-run lines (
run=...) now print achecks: ChampionChecks { as_trained, reset_each, reversed_no_reset, reversed_reset_each, all_orders_reset_each }field with the same meaning.The usage text (printed when run without arguments) now documents every mode, every key, and every check.
New keys for the
MutationConfigfields the bench lacked (so #108 can tune with it). If a key is not given, the bench uses the library default:xavg(crossover_weight_averaging_rate),surv(survival_threshold),champ(champion_copy_min_offspring,inf= off),splitw/splitb(split_neuron),step(step_time),integ(0 exponential Euler / 1 explicit Euler),out(0 sigmoid / 1 linear),stag/elit(species_stagnation),reeval(reevaluate_elites).mutp,taurate,tmaxandassignalready existed.The bench code moved to
examples/xor_bench_common/mod.rs(same pattern asctrnn_common), sotests/xor_bench_tests.rscan test it.How it was verified
tests/xor_bench_tests.rs(11 tests, written first and seen failing). They check:MutationConfig::default()all_orders()returns the 24 permutationsreversed_no_resetdoes_no_reset,_reset_eachor_as_trained, and is documentedcargo fmt -- --check,cargo clippy --release --all-targets -- -D warnings(default, telemetry, all-features),cargo build --release --examplesandcargo test --release --no-fail-fastall pass.Closing criterion
Bench A (
xor_bench 50 500 init reset=1 seed=S) gives identical results before (develop 8f46570) and after:ref #106
Part of epic #55
🤖 Generated with Claude Code