Hi All
I know this is a gaming simulator designed to target hardcore gamers who love motogp, and motorcycles in general, however there is another group of individuals that would benefit immensely from this simulator, engineers! This is a simulator and not just an arcade game, it is designed to simulate/emulate the real world physics of the sport or activity and it seems like it does a really good job! Engineers would love to use this simulator for SiL (Software in the Loop) and HiL (Hardware in the Loop) simulations to test various types of embedded systems, ie safety systems, control systems, etc.
As engineers we are always thinking of ways to automate a process to maximize our efficiency and productivity. So when we run a HiL or SiL simulation using a simulator like this one we would like to be able to automate this as well and this would be very easy to accomplish if the simulator provided the user with the ability to use a embedded robot to control the vehicle during a race, basically the ability to allow the computer to race for you or the ability to race against the computer. This may or may not be interesting to gamers but engineers would love it! Don't get me wrong my guys would love to be in the lab playing video games all day, LOL, but I don't think this is a very productive use of their time at work, LOL.
As it stands now this is what they have to do when they want to use a simulator like this and run a SiL, or HiL simulation, and it would be really helpful if we did not have to do this. The computer would perform better, in almost every way and we would get better data faster. Don't get me wrong I like the game, but I'm not a gamer, haven't played a video game since StreetFighter II Turbo, LOL. I've been trying to play GPB now for a few days, and I haven't been able to get around the track once without falling several times! In fact I don't think I've made a complete circle of the track yet, LOL. You can imagine how frustrating this could be if all you are trying to do is generate live data to test your embedded control systems and algorithms.
I know its pathetic, PiBoso help us please, LOL! Just a hopeful suggestion.
Creating a robot that can ride the simulated bike around a track is possible.
However, it would require work. A considerable amount of time should be invested to add this feature, that would only be beneficial for you and very few others.
If your message is just a suggestion, then unfortunately it's probably never going to happen.
If, on the other hand, you have a solid project with a budget to invest on it, then it's possible, if you have the patience to wait a few weeks.
Hopefully this message doesn't sound too greedy... But really this is mostly a one-man show busy on multiple projects at the same time.
Hi
Thanks for responding, and no I don't think you came off as greedy, we will definitely give your offer some thought, it might be worth it.
Still, I don't think it would only be engineers that benefit from this feature. This seems like a pretty standard feature of most games, I know this game is built around a great community that is very active, but the ability to race the cpu would attractive to newbies, and also great for training.
Quote from: asic_designer on March 24, 2016, 07:58:53 PM
Hi
Thanks for responding, and no I don't think you came off as greedy, we will definitely give your offer some thought, it might be worth it.
Still, I don't think it would only be engineers that benefit from this feature. This seems like a pretty standard feature of most games, I know this game is built around a great community that is very active, but the ability to race the cpu would attractive to newbies, and also great for training.
A full fledged AI would go way further what you need... Not only it would have to be competitive at the limit, but it would also have to take the other bikes into consideration, and overtake them or change line and adapt to it while still pushing at the limit. It would also have to handle different setups and handle the different sessions, for the example the different stints during a practice session.
Quote from: PiBoSo on March 24, 2016, 08:20:25 PM
Quote from: asic_designer on March 24, 2016, 07:58:53 PM
Hi
Thanks for responding, and no I don't think you came off as greedy, we will definitely give your offer some thought, it might be worth it.
Still, I don't think it would only be engineers that benefit from this feature. This seems like a pretty standard feature of most games, I know this game is built around a great community that is very active, but the ability to race the cpu would attractive to newbies, and also great for training.
A full fledged AI would go way further what you need... Not only it would have to be competitive at the limit, but it would also have to take the other bikes into consideration, and overtake them or change line and adapt to it while still pushing at the limit. It would also have to handle different setups and handle the different sessions, for the example the different stints during a practice session.
A good AI would also need to make realistic mistakes every once in a while...
Last but not least, the bike simulation is too complex to allow for a grid of competitors. So the only solution would be to make a second, much simpler, physics model, that still uses the same data as the full one.
Also I think in gbp it would be nice to have an IA, especially to learn a new track. When there is not a lot of people online, it is essential to have a mode for offline races. :P
I think most of us would already be happy if the MXB 'helper' ghost rider would make it to GPB.
It would be a really good tool to learn the best lines on a track.
........Probably more useful in GPB than it is in MXB.
This seems to be a major conversation point all over the forum right now, not just here. As you are here Piboso and putting some really good points across about AI, may I ask a few quick questions that would answer a lot for many members of the forum.
Firstly, is the Trainer in MXB possible in GPB and if so could you do it for the next release?
Secondly, would you consider adding AI, IF it is possible for the many actual GPB riders that would like it and to cater for those that have not purchased GPB due to the lack of AI.
I fully understand your reasoning for not wanting AI in GPB due to the possible "Arcade" title it may give GPB.
A trainer is the more realistic way to help new riders as it is for the bettering of their own riding, not a gimmick and not arcade in any way.
Thanks for any response on this.
Back to the Robotic point and what you say is so true. The amount of variables a robot would have to understand and then react accordingly to is extreme to say the least. The mechanics are simple enough, but the correct programming would be a masterpiece to itself. All the points you have noted are only the beginning of it all. How could GPB be able to communicate every aspect that is happening to another computer when the human input is made due to visual information only? The robot would have to be reading every point of information and be able to understand what it means. What I mean is, if I am riding in GPB my reaction is due to me seeing another bike making a certain move and judging where it is going, to teach a computer to JUDGE movement from present data is the thing that gets me. THat is REAL AI as the computer has to think if the bike is here and taking this line it is going to go there, but what if the other rider suddenly breaks or this or that, so many variables for it to handle???
Mind blowing amounts of data bro
DD
Quote from: doubledragoncc on March 24, 2016, 09:26:06 PM
Secondly, would you consider adding AI, IF it is possible for the many actual GPB riders that would like it and to cater for those that have not purchased GPB due to the lack of AI.
I fully understand your reasoning for not wanting AI in GPB due to the possible "Arcade" title it may give GPB.
The main reason for not integrating AI is that it would be a colossal amount of work, to have something that would probably end up not very good anyway.
Thanks Piboso fully understand that and should stop requests for it lol.
And more importantly the Trainer for GPB. I did a test with the S80 on Croft in MXB and it felt really good to see how I was taking a certain line riding behind and then correcting it, even if the bike had no wheels and I had an Orangutan sitting behind me lol.
Can we get it in GPB? PLEASE
DD
I agree on the trainee being a good thing in GPB for many riders, people who are not used to racing motorbikes might find it little hard to get around a track on the fastest line, since it is actually quite different lines from cars and also very different lines depending on what bike you ride. I see many riders doing a ton of laps, without really finding much better lines and i think this could help, and this also goes in real life. In real life you on many trackdays have a master rider for the "slower classes" who will wear a yellow vest and show the lines or you can hire a rider to help with setup and on track.
In GPB, we of course help eachother online, but when there is no one online, this could be a good thing or if you feel like practicing before you go online, to not disturb or something, then the trainer would be a good thing i think
I agree with the "trainer" request. This would be sufficient for everyone's needs. A complete AI may perhaps be too complex, however just a simple robot/trainer which can navigate a track fast efficiently would be great. This would suit our needs definitely, just so long as we can tap into and pull data from the trainer, and have it run independently, itself on the track.
Quote from: asic_designer on March 25, 2016, 01:03:47 AMI agree with the "trainer" request. This would be sufficient for everyone's needs.
IMO, a ghost rider (without AI) would already be enough.
The really fast guys could just share their replay files so that everyone can learn their lines offline without the need for an actual AI figuring out the fastest line (which would probably be slower for most tracks anyway).
A nice feature would be the possibility to load multiple ghosts/trainers 8)
I would like a Ghost Rider, to help me work on DST. So I can do laps riding with myself to see how much lean angle I am getting what my lines are on track. If I can lean it over more. This would help me a lot. Not really interested in AI racing.
Quote from: PiBoSo on March 24, 2016, 09:36:57 PM
The main reason for not integrating AI is that it would be a colossal amount of work, to have something that would probably end up not very good anyway.
I agree.
Quote from: asic_designer on March 25, 2016, 01:03:47 AM
I agree with the "trainer" request. This would be sufficient for everyone's needs. A complete AI may perhaps be too complex, however just a simple robot/trainer which can navigate a track fast efficiently would be great. This would suit our needs definitely, just so long as we can tap into and pull data from the trainer, and have it run independently, itself on the track.
The trainer (as it is already in MXb and KRP) is just a saved "replay" that is shown on track while you ride.
It would not fill your need asic-designer: you will have to be riding to see it (and the data will be from the bike you're riding).
Quote from: HornetMaX on March 25, 2016, 08:08:13 AM
Quote from: asic_designer on March 25, 2016, 01:03:47 AM
I agree with the "trainer" request. This would be sufficient for everyone's needs. A complete AI may perhaps be too complex, however just a simple robot/trainer which can navigate a track fast efficiently would be great. This would suit our needs definitely, just so long as we can tap into and pull data from the trainer, and have it run independently, itself on the track.
The trainer (as it is already in MXb and KRP) is just a saved "replay" that is shown on track while you ride.
It would not fill your need asic-designer: you will have to be riding to see it (and the data will be from the bike you're riding).
Ahhh yes I see, thanks Max.
AI can actually work really well with GP Bikes, and easily so. It need not be a f*** up. You can build really effective AI by training it. It's something I came up with after only a few seconds of consideration so there might be issues, but I don't think so. My proposal? Lap a certain track many, many times, and have the AI record your exact movements. The set of inputs which cause crashes can then be completely ignored. Keeping those inputs which result in complete laps will allow for AI which can lap in several configurations of racing lines. The changing variables (like tyre wear) of course will also be recorded from the player and so can allow for AI to adapt to conditions. sets of inputs which result in crashes or going off track can be kept and designated for utilization by the AI to simulate the fallible human element. This would be allot of work, given that there are quite a few bikes available in GP Bikes (mods and whatnot), and many tracks (mods and whatnot), so rather than doing all the work Piboso, simply create a set of tools for the users to then use in building the AI around a base artificial intelligence model you create.
I'd say you needs a few additional seconds of consideration.
Quote from: HornetMaX on April 16, 2016, 06:04:59 PM
I'd say you needs a few additional seconds of consideration.
Elaborate
"Learnig" a trajectory is a fairly simple task. Definitely you don't need to do what you described (the "training" stuff).
In principle it's essentially a dynamic inversion problem, but tackling it this way is hard and inflexible.
However, one could set up a relatively simple tracking controller with a predefined trajectory, that's not too hard.
The current GPB virtual rider does essentially that with a few exceptions:
- The trajectory is not given by X,Y points but by lean angle points (plus throttle and brake)
- There's no predefined target trajectory: you give the trajectory in real time with your joypad input
- Due to the absence of pre-defined trajectory, the tracking controller can't have any form of look-ahead (which is usually a big plus in terms of accuracy of the tracking)
That said, the problem is that while you're on track with 20 other bikes, you don't stick to the one single trajectory you can do. You have to watch where other bikes are, brake to avoid collisions, get out of the perfect line to avoid obstacles, overtake or avoid being overtaken. It's far from trivial. If in just a few seconds you can devise a brillant solution for that, then you can ring the MIT or Google: they will fly you first class to the US and offer a tremendous scholarship or job. :)
Quote from: Urban Chaos 2.0 on April 16, 2016, 06:46:40 PM
Quote from: HornetMaX on April 16, 2016, 06:04:59 PM
I'd say you needs a few additional seconds of consideration.
Elaborate
This would require a lot of coding (intelligent AI, i mean) it isn't just a case of it taking the best parts from a lap and stringing them together otherwise all games would have used this system long ago.
The closes thing we have to AI at the moment is in MX Bikes in the form of the Trainer ghost. (you record a fast lap, the game can save that lap and then you try and beat it then you can use that lap to then try to beat) You are racing yourself but i believe it would help the slower riders if people shared their laps for people to try to beat.
It is a general solution, so there is nothing specific to Piboso's code base in the suggestion. If left alone, the AI could perform repeated laps with variable lacing lines. The inclusion of one additional rider (the player) will only be a matter of prediction. Given the typical racing lines, the AI can continue it's path, or slow down depending on the position of the player. Given the commonsensical nature of that, I didn't bother to mention it. AI must be slowly rolled out and improved, as the GPB beta is. It can't be expected to be in "full working order" in its first stages (which should be single-player only for the first few releases). Teaching the AI through repeated laps is the best method, I feel. Given that the responsibility will shift from Piboso, to third party developers who can create their own brands of AI for each track as they see fit.
Currently finishing my studies in...AI. Si I know "a bit" about that stuff ;D
Following a trajectory is pretty simple, but you'll need to code something to get the correct trajectory. The "cheated" version would make the track builder register a "prefect lap" as the reference for any AI on track. But if you start to do that, the AI would be already not a real AI. Once you've done that, the harddest part comes : multiple bikes sharing the same tracks. You'll need to predict any collisions (as a human) and take in consideration your options. The decision part is the biggest (and harddest) part of a good AI. You can avoid a collision, but by doing that you'll maybe create another with someone else. That's just a simple example. There a few other domains to consider to create a full AI, but it's not a simple task. Implementaing an AI is not easy, especially in racing games when a wrong decision would lead to a tootal disaster on track.
How about having Multiple Trainers from different real riders!!! Beats any AI and I know it would have several problems but if the Trainers passed through each other it would not be a problem but it would be good for learning to overtake multiple riders.
DD
Quote from: Urban Chaos 2.0 on April 16, 2016, 07:16:23 PM
Teaching the AI through repeated laps is the best method, I feel.
You may feel that, but you've already two of us (with some fair knowledge in the area) telling you it's not.
Quote from: Urban Chaos 2.0 on April 16, 2016, 07:16:23 PM
Given that the responsibility will shift from Piboso, to third party developers who can create their own brands of AI for each track as they see fit.
That is something that is already doable today: I could code an input plugin that can actually ride the bike for me (i.e. autonomously provide the inputs to GPB).
GPB would see the "robot" rider just as an input device (a joypad). The hard part, of course, is ... the AI (i.e. how to compute the inputs).
Getting an AI to ride a lap is one thing, getting an AI to react to other players is a whole another ball game. That's when AI becomes intelligent rather than a trainer...
Quote from: HornetMaX on April 16, 2016, 07:59:20 PM
Quote from: Urban Chaos 2.0 on April 16, 2016, 07:16:23 PM
Teaching the AI through repeated laps is the best method, I feel.
You may feel that, but you've already two of us (with some fair knowledge in the area) telling you it's not.
Quote from: Urban Chaos 2.0 on April 16, 2016, 07:16:23 PM
Given that the responsibility will shift from Piboso, to third party developers who can create their own brands of AI for each track as they see fit.
That is something that is already doable today: I could code an input plugin that can actually ride the bike for me (i.e. autonomously provide the inputs to GPB).
GPB would see the "robot" rider just as an input device (a joypad). The hard part, of course, is ... the AI (i.e. how to compute the inputs).
You don't get me. Let me explain:
I'm lazy to type, so I'll be as brief as possible. There are several phases of development of the AI. The first and most basic of which is as follows:
A circuit is navigated along paths with restrictions, the inside of which constitute a probability of racing lines. When 'x' number of such lines are realised by the continued inputs of a user, the data sets (inputs, track position, etc.) can then be sent to an AI program. This program can then replicate directly, or improvise (based on a statistical availability of possible trajectories) the lines. When one additional rider (the player) joins the AI, the paths along the circuit are predictable by the AI via the stored statistical information of the rider's lines (which limits the AI's behaviour to a a specific bike the user rides). Given the position of the player, it can be very easily calculated, how far the player will travel along the most likely trajectory. When amalgamated with the AI's track position, the rate at which it continues to lap the circuit in the provided trajectories can then be varied to allow for some awareness of the player's position.
Should the player make a mistake, or operate outside the ascertained parameters, there will be no problem unless he hits the AI rider. In which case, they both are disturbed (as in real life). Should the player make an attempt to overtake, the onus is on him to do so properly, and if he does so, it's a simple matter on the AI's part, of maintaining velocity, or it's rate of change inside the circuit so as not to make contact. Something achieved via the processes outlined above. Overtaking on the part of the A.I. is a matter of a set of defined "behaviours" (in accordance with the lines and location information described above) which one could classify as "risks".
More riders simply means several more instances of the AI's awareness system and a reduction of possible position outcomes on the part of the AI (where the AI can place itself). Then there's the optimization stuff, etc. Things which can only come through time and development. Initially, the AI should be for offline use only and for a single rider.
There should be no coding involved on the part of the third party. The basic systems would have to have been in place by piboso, to allow for users to mark certain parts of the track for certain functions, and to supply the AI with pre-set data from which to begin calibration. The development tool would be entirely up to piboso of course, and the extent to which is offers UI-based programming of the AI would as well be up to him. It's only a suggestion, and as I've said: I don't know Piboso's code base, so how he would interpret the suggestion is something he will know. Perhaps it would not work with his current layout, and might not be feasible. I wouldn't know.
You're suggesting something for as problem that's not there.
Again: computing a nice trajectory is not that hard. The rest is hard.
Haha, you still didn't get me. But never mind it's all good. In any case, the rest is not hard. Not to me.
Quote from: Urban Chaos 2.0 on April 16, 2016, 09:55:11 PM
Haha, you still didn't get me. But never mind it's all good. In any case, the rest is not hard. Not to me.
Can you write code?
Genuine question :P
DING DING
Quote from: Urban Chaos 2.0 on April 16, 2016, 09:55:11 PM
Haha, you still didn't get me. But never mind it's all good. In any case, the rest is not hard. Not to me.
I don't get you, but I doubt anybody else gets you either.
Quote from: Urban Chaos 2.0 on April 16, 2016, 09:55:11 PM
But never mind it's all good. In any case, the rest is not hard. Not to me.
Go do it then. If you succeed we'll all be extremely happy.
And before you say something along the lines of "I'd need Piboso to do this and that", no, you don't need that.
Just write a module that, given all the data passed by GPB to an output plugin (you can find it here: http://www.gp-bikes.com/downloads/gpb_example.c (http://www.gp-bikes.com/downloads/gpb_example.c)) generates the control input to be passed to an input plugin (you can find it here: http://www.gp-bikes.com/downloads/input_int.c (http://www.gp-bikes.com/downloads/input_int.c)). I can help if you have specific questions.
Even better: recently somebody mentionned TORCS on this forum. It's an open source car sim.
It turns out it has a pretty nice tutorial that shows how to implement a *very basic* AI.
I'd suggest you read it to have an idea of the thing.
TORCS page: http://torcs.sourceforge.net/ (http://torcs.sourceforge.net/)
Robot tutorial: http://www.berniw.org/tutorials/robot/tutorial.html (http://www.berniw.org/tutorials/robot/tutorial.html)
Hahaha. Unfortunately and fortunately, my proposed solution has nothing at all to do with writing a plugin for GP Bikes.
Quote from: Urban Chaos 2.0 on April 17, 2016, 07:36:31 PM
Hahaha. Unfortunately and fortunately, my proposed solution has nothing at all to do with writing a plugin for GP Bikes.
You didn't get it, as expected.
OK, let me elaborate before you ask.
TORCS allows you to easily plug your own AI into their sim.
In GPB, combining an output/proxy plugin with an input plugin, you can plug your own AI into the sim.
As you said that the AI part is easy for you, I don't see any obstacle for you to start coding the easy part and show it to us.
If you want to start with something (much) simpler: don't bother about the optimal trajectory, just write a bot that follows the centerline (provided by GPB) without crashing into other riders.
It's far from being a complete AI, but it's already a starting point.
Max... you didn't get me. I say: Read my suggestion again.
Quote from: Urban Chaos 2.0 on April 18, 2016, 08:19:05 AM
Max... you didn't get me. I say: Read my suggestion again.
What he is saying is who is going to write the code for an AI. Piboso is to busy working on getting the game to a finished state and this does not include implementing AI (he has stated this many time before).
Max has also correctly stated an AI Can be made using the input plugin provided by Piboso but a 3rd party would have to write the code for the plugin.
Its not a matter of weather AI can be implimented, because it can be but
It's who is going to impliment it.
Yes but you just dont get me!!!
LMFAO
DD
Quote from: Urban Chaos 2.0 on April 18, 2016, 08:19:05 AM
Max... you didn't get me. I say: Read my suggestion again.
I do agree on that.
Quote from: Urban Chaos 2.0 on April 18, 2016, 08:19:05 AM
I say: Read my suggestion again.
I say: no thanks, I've read it more than enough.
Max is Maxed out bro
DD
Quote from: matty0l215 on April 18, 2016, 08:43:59 AM
Piboso is too busy working on getting the game to a finished state and this does not include implementing AI (he has stated this many time before).
Its not a matter of weather AI can be implimented, because it can be but It's who is going to impliment it.
Ah, I see. Well that clears it all up, haha.