Navigation

Rule Engine Dashboard

Train historical data or run a prediction from one page. The UI keeps the common knobs visible and hides the long CLI tail behind a single submit action.

Mode train / predict
Default quinella
Overlay 2+1 or 3-pick
Exclude --exclude-rules
Runner rule_engine_fundamental.php

Current rule set

fundamental_v1

Preset

Custom

Planned command date

Execution

Preview only

Run Setup

Prediction uses one date. Training uses a historical range.
Select a preset to preload the usual settings for that workflow.
Used when saving a new preset or updating an existing one.
Human-readable label shown in the preset dropdown.
Use win or quinella and set the Top Picks Count / Rule Evaluation Top N to control the evaluation horizon.
Quinella mode uses quinella payout/coverage for ROI and rule success; win mode uses win odds.
Comma-separated rule names to ignore for this run only. This maps directly to the engine's --exclude-rules parameter and can be filled with weak-rule suggestions from the backtest report.
Dropdown is populated from available race dates in race/screener/history.
Prints full per-rule score trace for this horse number on the selected print/prediction date.
Optional code filter for trace. Supports comma-separated codes, useful when horse numbers repeat across races.
Used when Print pick breakdown is enabled. Controls how many rule contributions are listed per pick.
All per-rule success/failure outcomes use this pick count (not fixed top-4).
Used for the Box Balance column. Each combination uses this stake amount.
Display only. Outcome success/failure uses Rule Evaluation Top N.
For quinella metric, per-rule success means at least one of rank 1 or rank 2 appears in the rule picks.

Overlay Controls

Default overlay rules: rebound_quin_candidate, top2_history_bad_last_low_open_odds, last_race_odds_drop50, recent_top2_rate, recent_top3_rate, seq_top4, seq_fresh_state_rank, predicted_state_priority, state_plus_rate_change_odds_track2, track_profile_weighted, value_longshot_odds, low_odds_past6_quin, overlay_lastodds_track123_quin_potential, new_horse_trainer_season_win
Comma-separated overlay rule names to allow. Leave blank to use the engine default include set.
Comma-separated overlay rule names to disable for this run.

Combo Controls

Training Controls

Execution Flags

Rule Logic Reference

Use this as a quick explanation of what each rule is trying to capture in scoring.

Rule Logic
health_penalty Penalizes horses when the latest race incident report or incident tags show health issues such as 健康問題. Higher value means bigger risk penalty.
consistency5 Rewards consistent recent placings across the latest races.
form3 Rewards strong recent form, with extra emphasis on the latest few runs.
rest_balance Rewards healthier rest spacing; avoids too short or too long layoff patterns.
besttrack Rewards fit between horse profile and track or distance conditions.
track_pick Rewards the track-level pick signal if the horse is selected by that source.
seq_top4 Rewards horses that appear in sequence-based top pick snapshots (seq 1 to 4), and adds extra score when current-race track2 is below 100; lower track2 gives higher additional score. Also applies an overlay boost to a high score when the horse has past quinella history (rank 1 or 2 in past6) but current opening odds (oddsfrom) are above 20.
marked_runner Rewards horses explicitly marked as runners of interest by source signals.
last_race_odds_drop50 Rewards horses whose last-race opening odds (lastoddsfrom) shortened versus last-race closing odds (lastodds), then adds extra retry credit when past6_0 is above 3, with rank 4 getting the strongest bonus and higher ranks tapering down.
lastload_drop_significance Standalone load-drop rule: rewards horses whose lastload is above current loading, with a non-linear bonus so larger load drops matter disproportionately more than smaller ones.
new_horse_improving_lastpace Rewards relatively new horses with fewer than 10 races when the last pace position improves from lastpace_0 to lastpace_1, with larger improvements scored disproportionately higher, extra credit when lastpace_0 is already near ranks 1 to 3, and an additional bonus when the horse has never run the current location+track+distance before.
odds_rebound_after_bad_last Scores higher when last race had strong odds shortening and current race continues to shorten, with past6_0 > 5 as the bad-last-result rebound condition.
low_last_odds_signal_bad_finish Triggers when lastodds is below 10, with lastoddsfrom - lastodds > 0, and the horse did not finish top 3 in the last run (past6_0 >= 4). Within that bad-finish range, better rank (lower past6_0) gets higher score.
top3_high_open_odds_penalty Penalty rule: deducts score when last run was top 3 (past6_0 < 4), but current opening odds are high (oddsfrom > 20) and opening odds are higher than last race final odds (oddsfrom > lastodds).
contrary_hot_place_after_bad_lasttime Contrarian market signal: rewards horses with weaker previous race outcome (higher past6_0) and slower lasttime versus besttime, but currently hot (lower) place odds, indicating strong market confidence despite poor recent form/time.
contrary_strong_odds_after_poor_recent Contrarian rebound rule: requires very poor recent profile (past6_0 > 9 and all past6_0..past6_5 > 6), then rewards when current win/place odds still show unusual strength either in absolute terms (relatively low odds) or relative to peers in the same race with similar latest rank.
rebound_quin_candidate Rewards horses with top-2 history whose latest run rank worsened versus prior run, while opening odds (oddsfrom) are shorter than last race odds (lastodds), indicating rebound market support.
besttrack_lower_better Rewards horses with lower besttrack value (smaller is better).
top2_history_bad_last_low_open_odds Rewards horses with historical top-2 pattern, weak last finish, and low opening odds profile.
recent_top2_rate Rewards stronger recent top-2 hit rate patterns.
recent_top3_rate Rewards stronger recent top-3 hit rate patterns.
seq_fresh_state_rank Ranks horses higher when they are still fresh (numRaces < 6), have better seq values (lower seq is stronger), and are marked with state + for improving form.
state_plus_rate_change_odds_track2 High-conviction contrarian rule: boosts horses when state is +, rate_change is at least 7, odds moved in a favorable direction across the last-race and current-race odds, the horse is still fresh (past6_0 < 4, seq < 4), current opening odds are below 6, SW is above 5, and track2 is below 100; lower track2 gives a stronger score.
low_odds_past6_quin Boosts horses when current opening odds are below 10, the latest past6 rank is poor (>= 10), and the recent past6 history includes a quinella position.
overlay_lastodds_track123_quin_potential Overlay potential signal: requires both lastoddsfrom and lastodds below 5, seq below 5, at least one of track1/track2/track3 below 100, and a past6 quinella record (rank 1 or 2). Lower qualifying track values and stronger prior quin history increase the score.
new_horse_trainer_season_win Overlay boost for new-horse candidates when the trainer has a winning record with new horses in the current season and the horse opening odds are below 20.
rate_change_gt6_same_class Rewards horses when rate_change is greater than 6 and the current race class matches the last class.
quin_ref_rating_loading_match Rewards horses whose current rating and loading are closer to the horse's recent historical quinella (rank 1 or 2) reference values. Adds a heavy-runner caution discount when numRaces > 20, current loading is more than 15 above lastload, latest rank is top 3, and market confidence weakens (oddsfrom > 10 and lastodds < oddsfrom).
best_stall_history_match Scores highest when current stall equals the horse's best historical stall under the same rloc, rdistance, and rtrack; nearby stalls receive partial score. Applies a discount when the current stall has historically poor outcomes under the same context, and adds directional stall-change effect: bonus when moving from weaker stall context to better stall context, penalty for the reverse.
sw_gt5_higher_better Rewards horses only when SW is above 5, and gives higher score as SW increases.
combo_best_pick Meta rule bonus: triggers when seq_top4, besttime_lasttime_speed, sw_gt5_higher_better, and rate_change_gt6_same_class all pass their combo thresholds for the same horse.
jockey_special_pick Uses jockey special-pick strength (yellow/red style from jockey switch patterns), then adds bonus when the new jockey has past quinella pairing with this horse or has higher ranking than the previous jockey. Impact is dampened when the last-race jockey (jockeyfrom) also has other special-pick targets in the same race.
grid_color_highlight_balance Scores by per-horse screen grid color counts: more red/yellow highlights increase score, while grey highlights reduce score.
besttime_lasttime_speed Rewards horses with faster besttime and lasttime values (lower times score higher), but applies a stale-besttime discount when numRaces > 20, especially when historical besttime is much stronger than recent lasttime.
rating_momentum Rewards positive movement in rating trend (upward momentum).
market_support Rewards favorable market support characteristics from odds-related signals (current and last-race odds shortening), but dampens the score when current odds are above 20; if past6_0 is in upper six (1-6) while odds stay above 20, score is reduced further. Also applies a strong penalty when lastodds was below 10 but current oddsfrom moves above 10 while the latest rank is top 3, indicating weaker current confidence.
stability_recent Rewards recent performance stability and penalizes volatile form swings.

Generated Command

php '/home/alphaone/public_html/betsdb/rule_engine_fundamental.php' --prediction-mode=predict --metric='quinella' --score-objective='hybrid' --roi-weight='0.25' --print-top-n=3 --rule-pick-top-n=4 --quinella_overlay_enabled=1 --quinella_overlay_mode='quinella' --quinella_overlay_min_odds='10.00' --quinella_overlay_min_signals=2 --quinella_overlay_min_score='1.40' --quinella_overlay_core_pick_count=3 --combo_best_pick_enabled=1 --combo_best_pick_seq_top4_min='1.00' --combo_best_pick_besttime_min='0.65' --combo_best_pick_sw_min='0.35' --combo_best_pick_rate_change_same_class_min='1.00'

Copy this if you want to run the same job from a terminal.

Run Output

Submit the form with Run command now checked to execute the engine here.