Repository navigation
Conversation
Co-authored-by: wavehs <156133648+wavehs@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
💡 What:
TypeErrorbug caused by overwriting the pre-allocated booleanforbiddenarray with asetinsidecompute_range_vs_range_equity.setlogic to use correct O(1) index assignments (forbidden[v0] = True) and properly resetting them at the end of the simulation iteration.[h_hand[0], h_hand[1]] + full_boardinstead oflist(h_hand) + full_board.evaluate = self.evaluator.evaluatemethod reference outside the hot loop to reduce Python attribute lookup overhead.🎯 Why:
The method was failing with
TypeError: 'set' object does not support item assignmentdue to an incorrect optimization attempt. This caused the equity solver to fail whenever ranges were evaluated. Further object creation (list constructors) inside the innermost loop slowed down evaluations.📊 Impact:
The solver runs correctly again without TypeErrors. Benchmarks show adaptive Monte Carlo hitting latencies well under the <500ms target constraints (44-136ms depending on street) and 8-25x speedups via early stopping. Removing list constructors and attribute lookups provides minor latency drops inside the innermost Monte Carlo evaluation loops.
🔬 Measurement:
Run
PYTHONPATH=. python evals/bench_solver.pyto confirm the benchmarks meet <500ms latency limits.Run
PYTHONPATH=. python -m pytest tests/test_solver.pyto verify no regressions in the calculations and no TypeErrors thrown.PR created automatically by Jules for task 9371676296307816497 started by @wavehs