AI player behaviour
#1
Hi! I've been playing STK for a few weeks now and well overall i am really surprised by the game. In general i really like the speed, it's much higher than other kart games.

In normal mode though the AI players don't always adjust speed properly, when there are no choke points AI players seem to lag behind. This results in many many basketballs and parachutes. Feels a bit like the AI is cheating there.

But most annoying of all, if you drive behind an AI and the AI passes a pickup point you get immediately hit by a bowling ball or what not. This is not how a human player drives or behaves.
Human players are handicapped as soon as they look behind them, the AI is not.

Proposed solution:
- Make the AI behavior random for what they do with the pickup or add a delay for rear projectiles.
- Give human players a small rear view mirror
- Handicap the AI player when he shoots projectiles behind him in driving skill or accuracy.
Reply
#2
(17-05-2026, 02:37 AM)deedee Wrote: Hi! I've been playing STK for a few weeks now and well overall i am really surprised by the game. In general i really like the speed, it's much higher than other kart games.

Yes! I think it's something that's very underappreciated by people who haven't tried the game and got a basic hand of skidding/nitro (or watched videos of people driving well).

(17-05-2026, 02:37 AM)deedee Wrote: In normal mode though the AI players don't always adjust speed properly, when there are no choke points AI players seem to lag behind. This results in many many basketballs and parachutes. Feels a bit like the AI is cheating there.

The AI doesn't cheat for powerups, at all. Furthermore, the gap the 1st player build to the AI karts does not influence the frequency of parachutes and basket-balls.

(17-05-2026, 02:37 AM)deedee Wrote: But most annoying of all, if you drive behind an AI and the AI passes a pickup point you get immediately hit by a bowling ball or what not. This is not how a human player drives or behaves.
Human players are handicapped as soon as they look behind them, the AI is not.

Proposed solution:
- Make the AI behavior random for what they do with the pickup or add a delay for rear projectiles.

When playing in the highest difficulty, AI is expect to do somewhat smart choices, not random stupid things. A delay for AI use after pickup has been considered and will probably happen in some form.

High level human players will sometimes use immediately shoot something backwards, by the way, it's just that it's a gamble on what will be in the item box, whereas the AI knows if the item can be used that way or not.

(17-05-2026, 02:37 AM)deedee Wrote: - Give human players a small rear view mirror

This is a concept I also thought about many years ago. It is technically feasible, however a rear view mirror would require rendering the scene a second time, which would have a significant performance cost. Also making it well-integrated in the UI and looking good is non-trivial. So that's not something the team has been working on, although I understand the idea's appeal.

(17-05-2026, 02:37 AM)deedee Wrote: - Handicap the AI player when he shoots projectiles behind him in driving skill or accuracy.

Usually, good players have little loss of driving accuracy from shooting backwards because it's done very quickly, however usually the backwards shooting isn't very accurate. The AI checks if another kart is in a spot it could touch, so accuracy can be quite good. On the other hand, the AI kart will do no effort at all to adjust its position to better shoot, it just waits for a good alignment to occur, so as a player it's not too hard to position yourself out of the way as the AI picks up the gift box (now if it's a cake you may not have much luck anyways but that's also true against humans).
Reply
#3
Thanks for the detailed answer, interesting to read trough those Github requests.

Quote:a rear view mirror would require rendering the scene a second time, which would have a significant performance cost.

Yeah, definitely make that an option if it ever gets realized. Performance should always be priority.

At the very least, can we have a dedicated button for instant backfiring? My gamepad has plenty of unused buttons right now.
Reply
#4
(Yesterday, 12:18 PM)deedee Wrote: At the very least, can we have a dedicated button for instant backfiring? My gamepad has plenty of unused buttons right now.

This was discussed here. In the end it hasn't been done so far because adding an extra button/key to default bindings was a concern, but technically it would be feasible.
Reply
#5
(Yesterday, 12:31 PM)Alayan Wrote:
(Yesterday, 12:18 PM)deedee Wrote: At the very least, can we have a dedicated button for instant backfiring? My gamepad has plenty of unused buttons right now.

This was discussed here. In the end it hasn't been done so far because adding an extra button/key to default bindings was a concern, but technically it would be feasible.

We seem to have similar ideas, too bad it didn't make it that time. I have been using AntiMicroX and made a macro button, which works the way i intended. Though i find it cumbersome to setup each time i run STK.

I've just build STK from git and all went smooth, so i guess i'll go the patch file route. Got any pointers?
When i browse /stk-code-1.5/src/karts/controller/player_controller.cpp i can see the fire action, but how is rear firing determined?

Code:
    case PA_FIRE:
        SET_OR_TEST_GETTER(Fire, value!=0);
        break;
Reply
#6
Firing back depends on a combination of look back and fire, but adding the extra key is far from a simple change in one spot.
Reply
#7
I wanted to ask, the AI drives on a certain trajectory? At least when you look at the driving behaviour, it seems to be like that. Is there any way to see this trajectory ingame (for example by ADM)?
Reply


Forum Jump: