Creating complex AI

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Pellaeon

New Member
Oct 27, 2003
5
0
0
Virginia, USA
I am a college student and one of my professors and I are thinking of doing an AI project using the Runtime. I have not seen much about AI though, so I am wondering what other people have done. I understand the "bots" are already written, but can the Runtime be used (with scripted events or whatever) to create more complex AI so the bots interact with the environment and can make informed decisions? That is, can we make a "bot" that will activly hunt down the user, or one that effectivly patrols an area or something?

Thanks!
 
Yep, can be done :) actualy you can do anything you want in the runtime (well the licence forbits you to do certain things)

But the unreal engine comes with some nice pathfinding functions, and a large bunch of native events (when it bumps into something, when it sees something, when ... it falls.... and alot of other stuff)

But with the runtime you'll have to code if from scratch.
 

Pellaeon

New Member
Oct 27, 2003
5
0
0
Virginia, USA
Daid303 said:
Yep, can be done :) ... But with the runtime you'll have to code if from scratch.

I see... so how hard would "coding from scratch" be? This would be a semester-long project, so I'd have lots of time, but since I'd need to learn how to use the program and such, I just wonder how much of a pain it would be.

Could we use the functions meant for the scripted events and navigation? If I could use all of those for the basics, it should not be too bad, though I have no idea how combat works... can a bot detect other bots or players? Can we use the existing AI to handle aiming, shooting and such?

Thanks for the help!
 
Pellaeon said:
I see... so how hard would "coding from scratch" be? This would be a semester-long project, so I'd have lots of time, but since I'd need to learn how to use the program and such, I just wonder how much of a pain it would be.
Well, if you already know how to program some other language learning UScript wouldn't be to much of a problem, just make sure you keep the wiki at hand. (wiki.beyondunreal.com/wiki)

Pellaeon said:
Could we use the functions meant for the scripted events and navigation?
Ofcourse you can, you can use anything that comes with the runtime engine.
Code:
native(518) final function Actor FindPathTo(vector aPoint);
native(517) final function Actor FindPathToward(actor anActor, optional bool bWeightDetours);
native final function Actor FindPathToIntercept(Pawn P, Actor RouteGoal, optional bool bWeightDetours);
native final function Actor FindPathTowardNearest(class<NavigationPoint> GoalClass, optional bool bWeightDetours);
native(525) final function NavigationPoint FindRandomDest();
All sounds like usefull functions to me ;)

Pellaeon said:
If I could use all of those for the basics, it should not be too bad, though I have no idea how combat works...
Combat=chaos ;) combat basicly means aiming and shooting, while trying to make the other person have a hard time aiming at you. But the runtime engine comes without weapons, so if you want combat you'll have to code some weapons yourself (or have some weapons coded for you)

Pellaeon said:
can a bot detect other bots or players? Can we use the existing AI to handle aiming, shooting and such?
Well the runtime engine doesn't have any real existing AI that runs around and shoots/aims. But you can easly detect players. Because a simple function is called for that, named: SeePlayer (sounds logical? well here is another event: HearNoise) but the default reaction code behind is empty. But the function will be called by the engine.

Pellaeon said:
Thanks for the help!
No problem, always willing to help ;)
 

Pellaeon

New Member
Oct 27, 2003
5
0
0
Virginia, USA
Combat=chaos ;) combat basicly means aiming and shooting, while trying to make the other person have a hard time aiming at you. But the runtime engine comes without weapons, so if you want combat you'll have to code some weapons yourself (or have some weapons coded for you)

I see. I assume lots of people have coded weapons and such (ooh, and maybe hand-to-hand combat?), so maybe they will share and save me the trouble (we really only care about AI, and figure that will be enough work). I guess I will ask around when we get that far...

As far as aiming goes (and dodging), what are projectile physics like? I assume the program has to calculate where the bullets are going and such, so can that be used to improve aim or does the bot just point in the general direction of an enemy?

Basically I am trying to figure out how complex of a "bot" we can create using the built in tools and functions. It sounds like we can have some real fun, but to justify this (a whole "independent study"), it would be nice to know we could do some really impressive stuff that would be more impressive than the usual game bot. Of course, games are forbidden and so there is no built-in support for weapons or anything... sad sad. I hope our AI thing does not count as a game...

Thanks!
 
Last edited: