AI Strategy - Follow the Leader

AI Strategy - Follow the Leader

Postby code-breaker » 16 Aug 2011, 05:26

I was just racing a follow-the-leader race. We were down to the last 3 karts. I was last and there was only about 5 seconds left. The kart in first place picked up a gift, and then promptly turned around and fired a bowling ball at the kart in second. This gave me just enough time to pass into second, winning the race. It was very interesting to watch, but I wonder if there is an easy way to add checks to the AI for situations like these.
code-breaker
 
Posts: 21
Joined: 03 Feb 2011, 05:02

Re: AI Strategy - Follow the Leader

Postby hiker » 16 Aug 2011, 05:55

What behaviour would you expected then? The AI leader does not distinguish between AI and player karts (more precisely: it doesn't even know much about FTL at all, it just tries to stop karts from overtaking ;) ). Adding some rules so that the AI would prefer humans as targets would certainly be possible (or more interestingly: taking e.g. the GP standings into account).

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: AI Strategy - Follow the Leader

Postby Crendgrim » 16 Aug 2011, 16:53

A way bigger problem is when the leader gets reset and there are still > 5 karts there (preferable 15 to 20): There will be such a great mess that the resetted leader can't really drive any more, and all other karts try to get behind him in any way. This makes surviving only a matter of good luck, not of skill.

Does anyone have a idea how this could be improved?
Crendgrim
 
Posts: 227
Joined: 03 May 2011, 21:59

Re: AI Strategy - Follow the Leader

Postby hiker » 17 Aug 2011, 01:00

Crendgrim {l Wrote}:A way bigger problem is when the leader gets reset and there are still > 5 karts there (preferable 15 to 20): There will be such a great mess that the resetted leader can't really drive any more, and all other karts try to get behind him in any way. This makes surviving only a matter of good luck, not of skill.

Does anyone have a idea how this could be improved?

Perhaps moving the leader forward far enough? We can estimate the distance based on the top speed of the 2nd kart. A patch for that would be great (hint: moveKartAfterRescue in the follow_the_leader mode would need to be overwritten).

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: AI Strategy - Follow the Leader

Postby code-breaker » 17 Aug 2011, 04:50

hiker {l Wrote}:What behaviour would you expected then? The AI leader does not distinguish between AI and player karts (more precisely: it doesn't even know much about FTL at all, it just tries to stop karts from overtaking ;) ). Adding some rules so that the AI would prefer humans as targets would certainly be possible (or more interestingly: taking e.g. the GP standings into account).


That is along the lines of what I was thinking. The kart in first place should not help me come in second, because then he does not win.
code-breaker
 
Posts: 21
Joined: 03 Feb 2011, 05:02

Re: AI Strategy - Follow the Leader

Postby hiker » 17 Aug 2011, 05:04

code-breaker {l Wrote}:That is along the lines of what I was thinking. The kart in first place should not help me come in second, because then he does not win.

In a follow-the-leader race the first kart is considered neutral, and it should not favor anyone (neither AI nor player). So it does not really help you (as in a human player) to win, it just makes life difficult for the current leader (kart on rank 2).

Of course we could add some code that the leader should try to hit player karts only. Perhaps only in hard mode? And in easy mode it could try to favor the player? Not sure if this makes much of a difference, or is worth the effort. Or perhaps give the leader no items at all (or only zippers)?

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: AI Strategy - Follow the Leader

Postby Turtle » 02 Sep 2011, 21:31

Or just have not get involved (ghost mode)?
Turtle
 
Posts: 68
Joined: 27 May 2011, 17:27

Who is online

Users browsing this forum: No registered users and 1 guest