fix(rl): heat cap uses >= not > (pos=8 at cap=8 must trigger)

With strict >, pos=8 passed the cap check, then a LongLarge(+2)
made pos=10 before the next step's cap fired. Using >= prevents
position from ever exceeding the cap by the fill size.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-05-25 11:00:56 +02:00
parent cd149cdb5d
commit ce5df13503

View File

@@ -52,10 +52,10 @@ extern "C" __global__ void rl_position_heat_check(
if (b < b_size && cap > 0) {
const int position_lots = *(const int*)(pos_state + b * pos_bytes);
if (position_lots > cap) {
if (position_lots >= cap) {
actions[b] = ACTION_FLAT_FROM_LONG;
s_flags[tid] = 1;
} else if (position_lots < -cap) {
} else if (position_lots <= -cap) {
actions[b] = ACTION_FLAT_FROM_SHORT;
s_flags[tid] = 1;
}