Tournament Leaderboard - Bug Fixing podium, Python
Mahima Bhat, 1st with 89.7 points
Back to the podium89.7/ 100
- Problem solving
- 47.5 of 55 pointsBugs fixed: 45 of 45 (3 of 3)Next steps: 0 of 5 (0 of 2)Approach: 2.5 of 5
- Coding
- 14.1 of 15 points
- Verification
- 13.1 of 15 points
- Communication
- 15 of 15 points
Problem solving
1 of 2
Coding
7½ of 8
Verification
7 of 8
Communication
2 of 2
How they worked
Reproduced the tie and bad-game reports in tests, fixed the best-score update and tie ranking, then corrected an assistant rounding edit that broke the README rule.
- Understanding
- The candidate opened src/leaderboard.py and the given test early, and asked the assistant what rank_of and strike_game do and why the comparison in rank_of is strict. They first suspected strike_game for the tie report, but the assistant pointed out that the tie can occur on a board with no strikes. The candidate then described the tie report as a rank problem.
- Plan
- The candidate did not state an overall plan before writing code. They first wrote a tie test with help from the assistant, then moved to the rank logic in standings() once the failing test pointed there.
- Build
- The candidate first fixed the tie ranking by trial edits to standings(), which took several runs to settle. Next they changed record_game so a worse game no longer replaces the best score. For the bonus rounding, the candidate asked for every fraction rounded up, and after the assistant's ceiling edit broke the expected values, they asked for only exact halves to round up. The final standings() assigns rank as len(rows) + 1 once per points group.
- Directing the AI
- The candidate asked the assistant for specific tests: a four-player tie board and a player with two games. They accepted the first test and later adjusted its expected values after running it. For the rounding they first asked for every fraction rounded up, which the assistant flagged as contrary to the README, and then the candidate asked for exact halves only. The assistant's record_game edit was accepted after the candidate had stated the rule in their own words.
- Turning points
- The first turn came when the assistant's test expectations and rank logic showed that the tie rank was being advanced per player. The second turn came when the ceiling rounding edit broke the expected values, and the candidate changed the rule to exact halves only.
- Verification
- The candidate ran the tests after almost every edit and used the failures to guide the next change. The final run passed all three tests before they finished. The bonus rounding has no dedicated regression test of its own.
- Finish
- The candidate ended with all three tests passing: the tie ranking, the kept best score, and the visible tournament-day test. The bonus rounding fix is in the code, but no test of its own checks the half-up case. Edge cases and the two next steps were not attempted, and the candidate said they would next check how strikes affect the best score. A stronger approach would add a rounding test for 12.5 and 12.4 and then check strike_game and the best-score fallback in tests.