Compare commits

...

2 Commits

Author SHA1 Message Date
semantic-release-bot
72bb2eb58b chore(release): 4.7.0 [skip ci]
## [4.7.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.6.10...v4.7.0) (2025-10-18)

### Features

* **complement-race:** enable adaptive AI difficulty in arcade ([55010d2](55010d2bcd))
2025-10-18 14:26:08 +00:00
Thomas Hallock
55010d2bcd feat(complement-race): enable adaptive AI difficulty in arcade
Implemented adaptive AI speed adjustment based on player performance:
- Added UPDATE_AI_SPEEDS handler to update clientAIRacers speeds
- Added UPDATE_DIFFICULTY_TRACKER handler to update local state
- Now matches solo game behavior where AI speeds adapt to challenge

AI speeds adjust based on:
- Player success rate (0.5x to 1.6x multiplier)
- Average response time (faster players get faster AI)
- Current streak (hot streaks increase challenge)
- Learning mode (no adaptation until sufficient data)

This provides dynamic difficulty balancing, making the game
engaging for both beginners and advanced players.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-18 09:25:02 -05:00
3 changed files with 32 additions and 3 deletions

View File

@@ -1,3 +1,10 @@
## [4.7.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.6.10...v4.7.0) (2025-10-18)
### Features
* **complement-race:** enable adaptive AI difficulty in arcade ([55010d2](https://github.com/antialias/soroban-abacus-flashcards/commit/55010d2bcd953718d8fea428b1f7f613a193779c))
## [4.6.10](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.6.9...v4.6.10) (2025-10-18)

View File

@@ -842,12 +842,34 @@ export function ComplementRaceProvider({ children }: { children: ReactNode }) {
}
break
}
case 'UPDATE_AI_SPEEDS': {
// Update client-side AI speeds (adaptive difficulty)
if (action.racers && Array.isArray(action.racers)) {
setClientAIRacers((prevRacers) =>
prevRacers.map((racer) => {
const update = action.racers.find(
(r: { id: string; speed: number }) => r.id === racer.id
)
return update
? {
...racer,
speed: update.speed,
}
: racer
})
)
}
break
}
case 'UPDATE_DIFFICULTY_TRACKER': {
// Update local difficulty tracker state
setLocalUIState((prev) => ({ ...prev, difficultyTracker: action.tracker }))
break
}
// Other local actions that don't affect UI (can be ignored for now)
case 'UPDATE_MOMENTUM':
case 'UPDATE_TRAIN_POSITION':
case 'UPDATE_STEAM_JOURNEY':
case 'UPDATE_DIFFICULTY_TRACKER':
case 'UPDATE_AI_SPEEDS':
case 'GENERATE_PASSENGERS': // Passengers generated server-side when route starts
case 'COMPLETE_ROUTE':
case 'HIDE_ROUTE_CELEBRATION':

View File

@@ -1,6 +1,6 @@
{
"name": "soroban-monorepo",
"version": "4.6.10",
"version": "4.7.0",
"private": true,
"description": "Beautiful Soroban Flashcard Generator - Monorepo",
"workspaces": [