[W.I.P.] Pro Racing AI

Hi everybody, I want to show you my new racing AI package: Pro Racing AI

Before developing my own AI package, I tried all the racing AI packages available in the Unity Asset Store and none of them fit my needs for my upcoming iOS racing game: I was looking for an AI package that worked out of the box with complex vehicle physics simulations (such as Edy’s Vehicle Physics or UnityCar) and was fast enough to challenge the player in all my tracks. There was a product that did a really good job in fast tracks with long straights and fast corners, but it wasn’t up to my expectations in tracks with short straights and lots of chicanes and slow 180-degrees turns.

As I wasn’t satisfied with any of the existing products, I started to develop my own AI solution a couple of months ago. At the beginning I started to develop this AI package for my own personal use, but after talking with several forum members, I decided to polish it a little more and start selling it in the Asset Store. Currently it’s in an alpha status, but I think it’s already good enough to make its first public appearance:

WEB PLAYER:
http://ProRacingAI.com/Demos

IMAGE GALLERY:
http://ProRacingAI.com/gallery1

I’ll continue improving the AI and finishing the website during the next month and I would expect to release the first public version in mid-to-end of October, but I wanted to hear some feedback from the community, see if people would be interested in a product like this or the features you will want to see in the final version…

FEATURES IMPLEMENTED IN THE CURRENT VERSION:

  • It works with Unity Free and Unity Pro.
  • It has been tested successfully with asphalt and dirt tracks, even in tracks with HUGE JUMPS.
  • It supports out of the box and with zero coding Edy’s Vehicle Physics, UnityCar and the official Unity Car Tutorial.
  • It uses advanced spline tools to model the ideal racing line, the track limits and the distance to the walls outside the track.
  • You can divide the track into different sectors and tweak the parameters for each sector separately to create a more challenging AI.
  • You can define a different racing line, aggressiveness and skill level for each AI controlled vehicle.
  • The track information can be saved / loaded from an external JSON file.

FEATURES THAT WILL BE IMPLEMENTED DURING THE BRANCH 0.x:

  • Basic obstacle avoidance / overtaking behavior.
  • Counter-steering maneuvers to avoid excessive drifting.
  • Advanced crash-recovering maneuvers (in case the AI crash with another vehicle).
  • Machine Learning: instead of tweaking the sector parameters manually, leave the AI racing alone in a second computer and let it find out the optimal values for you.

FEATURES THAT WILL BE IMPLEMENTED DURING THE BRANCH 1.x:

  • Optimizations for mobile devices ( remember I’m developing an iOS game :wink: ).
  • Advanced obstacle avoidance / overtaking maneuvers.
  • Allow the AI to choose randomly between several paths / racing lines at runtime. Each path will have a “weight” value indicating the probability of choosing that path. If all the path have the same “weight” value, the choice will be completely random.

OTHER FEATURES I WOULD LIKE TO IMPLEMENT AT SOME POINT (NO PROMISES):

  • AI Manager: a class that would change dynamically the aggressiveness and skill level of each AI controlled vehicle depending on the player’s skills. As the AI speed will depend on player’s lap times, he will never feel again the “lonely racer” syndrome because the AI won’t be too fast nor too slow for the player.
  • Easy Roads integration: create your track with Easy Roads and Pro Racing AI will generate the ideal racing line and retrieving all the track information for you. Does it sound good? That’s the reason why I want to implement this functionality at some point in the future…

//---------------------//

EDIT:
By the way, does anybody know how can I edit the Poll? I wanted to add several questions, but I don’t know if it’s possible… in case it’s not possible, there is another question that would be more important for me.

Reserved.

It looks great. I would like to see all those upcoming features you listed to be implemented. I noticed that you are using the alternate physics model of the Unity car tutorial. Will you support the standard car tutorial (car.js)? Will you show a demo with more than one car on track? I’m definitely interested in purchasing it.

Yes, I’m also planning to add support for the standard physics model from the Unity Tutorial. My AI is written in C#, but I have already added support for Edy’s Vehicle Physics (which is written in Javascript), so the standard physics model shouldn’t give me too many headaches… I’ll try to upload a new web player in a few days :wink:

Right now I can’t upload a demo with more than one vehicle because I haven’t implemented the collision avoidance behavior yet. When I implement this feature, I will update every demo to add support for player-controlled cars and several AI cars.

Looks great so far. Happy to hear it works with UnityCar :slight_smile:

I’d like a racing car AI tutorial than a package. If there is one, I will buy it.

@MooseMouse: I added support for UnityCar from the beginning because it’s the vehicle physics that I’m using for my own project. However, when I started to think in releasing the package publicly, I realized I should also add support for Edy’s Vehicle Physics and Unity Car Tutorial because there will be many people who prefers using those vehicle physics.

@flim: Well, if you look at the source code (fully commented) and the information I will include in the documentation and my website, I’m sure you will learn a lot about racing AI. It won’t be exactly a tutorial, but I think it still would be a very valuable resource…

I see you’re finally almost ready to release this AI to the public. Great jobs, so far. What will the purchase price be. I’m sure a lot of people have the same question.

Checked out the eddys physics demo and the car spun out and got stuck against a wall after a few corners… looking forward to seeing future versions :slight_smile:

I was just about to buy the other car ai system, till I saw this.

I am ready for beta now…

P-

@Bug5532 It’s a little weird because it doesn’t happen on my computer, but another forum member told me exactly the same thing a while ago. Does it happen in the “ascending right-turn” just before the bridge? If so, I’ll upload a new web build telling the AI to be a little more cautious in that corner.

@namoricoo It will take a while to implement all the planned features, but I think the AI is pretty good in its current status, so the first public version should be ready really soon. About the prices… they aren’t set in stone

//--------------------------------------//

EDIT:

Due to some confusions caused by the old pricing structure, I have decided to delete the contents of this post until I come up with a better pricing structure. I can’t say a final price yet, but I would like to offer (if people are interested) two types of license:

  • A license which will include the source code.
  • A cheaper license with exactly the same features, but without the source code.

I really want to know your opinions because it will help me to come up with a better pricing structure, so I would like to know if there would be anybody interested in purchasing a license without source code or if everybody want to purchase the source code license. Of course, customers who purchase a license during the 0.x branch (aka: public beta) will have a pre-release discount and every customer will receive free updates for the whole lifetime of the product.

$500, you must have fallen and bumped your head. Notice how people stopped responding after you posted that crazy price structure. You are essentially staying that your product is better than
Mega-Fier ($150) + playMaker ($100) + UniSky ($100) + RageSpline ($75) and I still have $25 in change. I can speak for the community. If you try to pull that Stunt, you won’t get a single client. By the way, in case you did not know .Dll files will not work for Unity Basic users. You just eliminated over 65% of your customers from the “bronze” level. I just removed your product from my wish list. Several other people are will do the same. If your price ever becomes reasonable, your approval rating will go back up. It will not go back to what it was before you tried to pull that stunt.

Firstly, good work and I wish you good luck with your ideas and project.

Sort of hi-jacking the thread, sorry, but as the AI programmer for Wipeout 2097 +, F1 2001 - 2003, WRC5, Motorstorm, PGR4 and more recently Blur and you are in need of AI for your racing game please get in touch as I’m now a freelance developer.

It is very easy to implement racing AI from papers and articles, for example in AI Wisdom books, but it’s the last 20% that is the hardest, usually for the pro players. If you look at the demo, you’ll notice steering oscillation, slowdown on corners when the car can clearly go faster, are all example of the last 20%. To get that 20%, unfortunately, you need detailed information about the physics. The simple steering AI oscillation is removed by using a simple PID controller, but this needs to be tuned most different car physics setups.

Anyway, good luck, but if anyone wants to get in touch then please do.

Cheers…

Darren
woo@wonkywoogames.co.uk
www.wonkywoogames.co.uk

@namoricoo

The $500 price tag would be for developers or companies that would require direct access to the repository and premium support, people who needs bugs fixed in a matter of hours (or a couple of days at most) instead of waiting for the next periodic update, I think that kind of support deserves a higher price, don’t you agree?

I expect most of my clients to choose the Bronze or Silver licenses, which have the same features than the Gold version and are intended for those people who don’t need or can’t afford that kind of premium support. If you look at the other Racing AI packages in the asset store (and you compare their features), you will see this package isn’t so expensive… in addition, as I stated in a previous post, my AI package is completely developed in C# and (as you will probably know) Unity Free can use .NET *.dll without any kind of problems, using a native *.dll is a Pro-only feature, but .NET *.dll can also be used in Unity Free without any problem.

So people which uses Unity Free will be able to use the Bronze License without any problem. I also said these prices aren’t set in stone… they are based in the features of the product, the amount of hours put into the project and the price of competing products, but of course they could go down if the sales number is lower than expected.

One more time: I expect most customers will choose the Bronze or Silver license (depending on if they care about having the source code or not). Only customers who needs faster bug-fixes and premium support should purchase the Gold license.

@Wonkywoogames

You are completely right, the car turning behaviour isn’t as smooth as it should be and the car could drive faster in many corners. That behaviour is because, as I haven’t implemented machine learning yet, I had to tweak the track parameters manually… and I obviously didn’t choose the best possible parameters for those cars in this track. I couldn’t justify spending more time tweaking those parameters when I could spend that time implementing machine learning and let the AI to find those parameters for me (leaving the AI running alone in a spare computer and comparing the lap times using different parameters).

You have to take into account this AI is still in a very early development status and there is a lot of room for improvements… but I think it’s still pretty good (even in its current status) compared to the other racing AI packages available in the Unity Asset Store.

About my AI implementation, it is based on some papers from the Paris AI Conference 2010. There was a presentation talking about the AI in “Superbike World Championship” and “SuperStars Next Challenge V8” and I’m trying to use the same approach… Have you seen that presentation? I would be really interested to know how good is my approach in comparison with the AI in the games you have worked.

@davidgutierrezpalma

I am a member of Ai Gamedev, but I haven’t seen either of the presentations you have mentioned due to other work commitments at the moment, so I wouldn’t like to comment. I also won’t comment on whether one approach is better than another, it depends upon what is needed for each project, platform and resources to bear in mind :slight_smile:

I can say that all the games I have worked on have common features, I don’t like to call it an AI system, such as the steering pid controller, but things like the speed controller and required data are widely different across all the games. However, each would work in the others game. Pick the right tool for the right job.

I really can’t go into too much detail, but one tool/technique generates the ideal racing line from the vehicles physical grip model. This produces AI data that is almost unbeatable if just measuring lap time. It also gives you other valuable data that will then allow you to create the Forza speed helper line (which is patented, so no game can directly copy this) for example, or write simple offline tools to predict the vehicles lap time (within a 5% error) which is useful for designers stack ranking when lots of cars are involved (guess the game ?). The AI data is also used to generate the gamelogic, ie laps, lap timer, etc, etc.

Sorry to hijack your thread, as current projects are coming to an end I’m looking out for new contracts. So if anyone interested in my developer services please take a look around my website and view my linkedin profile and stuff. I’m an old school generalist programmer specialising in AI, Physics and Gameplay. Here are some videos of my vehicle physics currently porting to c# for maybe a racing game on iOS.

Car Dynamics.
Bike Dynamics.

I wish you the very best of luck in your project.

Cheers…

Darren

http://www.wonkywoogames.co.uk
woo@wonkywoogames.co.uk

@Wonkywoogames

Maybe you should write the the “Commercial Work” forum (if you haven’t already done it), you will gain some visibility among the people who may be interested in hiring you. You seem to know a lot about this topic, if I weren’t short of cash I would probably hire you to help me finish the package…

In any case, I would like to hear your comments when I release the first public version and (hopefully) solve most of the current pitfalls… I know I have to improve a lot of things, but if writing a good AI were easy, it wouldn’t be so funny :wink:

@davidgutierrezpalma

I’m sure you’ll improve, so I’ll keep an eye out for your first version.

Good luck.

Darren

500 dollars? wow… That’s almost half of the Unity’s 1500 dollar pro pricetag. I’d pay 100 dollars for this, not 500.

@Wonkywoogames
If you port those vehicle Physics to Unity, let me know… I would like to add support for them in my product.

@carking1996
If you decide to purchase a Bronze License, you would only have to pay $75 - $100. Taking into account that the Bronze License has exactly the same features than the Gold License, I really didn’t expect so many complaints about the price of the Gold License…

@Everybody
The Gold License was never intended for customers on a tight budget or customers who can wait 1-2 weeks for a bugfix. It was intended for people who needs their problems to be fixed in hours (not in days) and for companies that requires a Premium support and are willing to pay for that level of service.

It seems the “Gold License” is causing some unnecessary confusion, so I will remove from my previous post to avoid more problems. I only wanted to offer a really high-quality support for the people who were willing to pay for it (and I’ll probably continue offering it on my website), but it seems it has been a big error to advertise it as “Gold License”, it wasn’t a wise decision. Apologizes for any unnecessary confusion caused for my previous post(s).