Author Topic: AI... again  (Read 8483 times)

0 Members and 1 Guest are viewing this topic.

Offline diamondgeezer

You know how, left to their own devices, AI bombers will fly up to a target and then just sit there unleashing the fury with their lasers? Well, fair enough they usually crash in to their target but we'll ignore that for now :)

Anyway, I was wondering if bombers could be made to make more convincing 'runs' against a big ship. Also, how's the rest of the AI improvement stuff comming along?

----------
Diamond Geezer has no problem with heights

 

Offline IceFire

  • GTVI Section 3
  • 212
    • http://www.3dap.com/hlp/hosted/ce
Gosh...after playing online a bunch of times...I thought only Adam Pletcher of Volition and myself were the only people to actually use the afterburner bomb attack on capital ships.

Alas, someone else does.
- IceFire
BlackWater Ops, Cold Element
"Burn the land, boil the sea, you can't take the sky from me..."

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
I saw almost everyone do that when I used to play online... :p

I think the main problem with the bombers is that if you tell the AIs to attack a ship, they will completely ignore all other targets and go after that ship alone even if they are being pummelled by something else that they could probably destroy if they actually tried to attack it. This shows up with fighters as well but is especially noticeable for bombers.

Also, bombers seem to use their afterburners much less than fighters do and rather simply cruise around. :p
« Last Edit: April 19, 2003, 09:55:38 pm by 296 »

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
maybe hardcode into AI behavior a no-fullstop-while-attacking kinda thing? keep them moving as is sensible?  this could get pretty complicated though, it seems that AIs now just move until they're within a certain distance and then just stop, maybe disallow speeds under say 30ms while attacking a target and just tie that in with new collision avoidence code?

 

Offline diamondgeezer

That could work... assuming it's codeable :)

--------------
Diamond Geezer does his fair share of the washing up

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
just a quick idea:
i wonder how random maneuvers would improve the ai's capabilities, ie. if a fighter is being persued, it will pick a random series of hard-coded (or even better-tbled) maneuvers.(eg. barrel roll twice, hard port bank etc)
i guess a tbl entry would go something like this:
Code: [Select]

$Situation: being_chased
$IFF: Hostile
$Maneuver1: barrel_roll
$AI_Levels: EASY, MODERATE, HARD ;ai levels in which to use this maneuver most
+fd_thrust=100 300 ;percentage of total thrust to apply to maneuver and for how long in milli-seconds
+WHILE:rt_bank=360 100 ;pitch, bank and yaw turns would be in degrees to turn and how hard to apply turn in % (thus controlling how fast and wide the turn would be)

$Maneuver2: stop_invert
$AI_Levels: MODERATE, HARD
+fd_thrust=0 100 ;kills thrust for a second
+WHILE:up_pitch=180 100 ;turns as fast as possible 180 degrees over which begins WHILE the stop instruction is being carried out
+THEN:fd_thrust=200 250 ;puts full burner speed (thus 200%) on AFTER the invert
etc.

i think this would allow a lot of flexibility in ai terms because you could have simple or complex maneuvers to perform based on difficulty level (or it could be applyed to AI setting. eg. $AI_Levels: Lieutenant, Captain, Major, Colonel etc.)
you could also have lists of possible maneuvers for situations like bombing runs, attack in wings etc.

i suggest this after seeing freelancer ai when persued-while it's slightly better than FS's fly-in-a-big-loop-to-try-and-get-around-behind-the-persuer tactic, it's still a very predictable constant barrel roll with the occasional burst of speed in a random direction.

so, would this be at all possible? or am i about to get toasted?
i would like to try implementing it, but i am only beginning to learn the basics of C, and havn't touched C++ as of yet. :(
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Fury

  • The Curmudgeon
  • 213
Quote
Originally posted by IceFire
Gosh...after playing online a bunch of times...I thought only Adam Pletcher of Volition and myself were the only people to actually use the afterburner bomb attack on capital ships.

Alas, someone else does.

What? :wtf: People do not use afterburners in bombing runs? :wtf:  Their loss. :p

 

Offline IPAndrews

  • Disgruntled Customer
  • 212
  • This site stole my work
Quote
Originally posted by LtNarol
maybe hardcode


Never use these two words in close proximity when talking about FS2 AI. This is what has killed the AI system in the first place. Please add any new behaviour patterns using flags. Really, all AI behaviours should have corresponding flags with the original FS2 AI classes of fighter, bomber etc... just being short cuts to select a subset of behaviours.

I'm going to keep saying this until people listen :P
Be warned: This site's admins stole 100s of hours of my work. They will do it to you.

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Quote
Originally posted by IPAndrews
Never use these two words in close proximity when talking about FS2 AI. This is what has killed the AI system in the first place. Please add any new behaviour patterns using flags. Really, all AI behaviours should have corresponding flags with the original FS2 AI classes of fighter, bomber etc... just being short cuts to select a subset of behaviours.

I'm going to keep saying this until people listen :P
If you meant using a new tbl for this, I'm all for it, but keep in mind that using a new tbl or even modifying ai.tbl means a hell of a lot more work than hardcoding a few maneuvers.  In our situation, something that complex may not be the best idea as the coders have other things to do with their time as well.  Think practical, not ideal. :nod:

 

Offline IceFire

  • GTVI Section 3
  • 212
    • http://www.3dap.com/hlp/hosted/ce
This is the one thing that I thought the StarLancer AI (and the FreeLancer) had over FreeSpace's.  The fact that the AI had manuvers to pull.  Even if the manuvers are something repetitive, having the ability to give the AI some tricks to pull...a hard loop around to get on your tail, a barrel role to evade fire, a couple of evasive manuvers to follow if someone is on their tail and some tactics for the attacking vessels to use to follow a ship doing this.

These would be worthy additions to the code for sure.
- IceFire
BlackWater Ops, Cold Element
"Burn the land, boil the sea, you can't take the sky from me..."

 

Offline diamondgeezer

Quote
Originally posted by LtNarol
Think practical, not ideal. :nod:

Then we end up with a game which looks stunningly beautiful, but in which the AI's crash in to things every five seconds

-------------
Diamodn Geezer is confident he could beat Zylon Bane in a fight

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Quote
Originally posted by diamondgeezer
Then we end up with a game which looks stunningly beautiful, but in which the AI's crash in to things every five seconds
You, sir, have a very unique definition of practical :p

I was thinking more along the lines of hardcoding a few simpler tricks rather than tie in another tbl, which in this case would probably end up being overly complex and extremely messy.

 

Offline IPAndrews

  • Disgruntled Customer
  • 212
  • This site stole my work
Nonsense. The AI code is big and scary but it's not particularly complicated. In the end you've got decisions on what AI behaviours to employ based on broadly defined ship types. We're suggesting taking it a step lower and giving behaviour flags or table entries. 99% of the AI code would remain unchanged. The lines that make the decisions about which chunks of code to use would change.

I'll try and have a look at it myself over the summer holidays.
Be warned: This site's admins stole 100s of hours of my work. They will do it to you.

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
And what happens when, with improved AI, everyone's missions are thrown out of balance?  Improvements to the AI should be applyed to new AI classes in the ai.tbl, and not to those already present.
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline LAW ENFORCER

  • Turret Fiend
  • 210
    • http://www.armouredstar.com
I belive AI should only be set in fred however the diffrent tactics n moves etfc should be in the AI table. Do we have to use those anoying captain, colnal AI levels as they are just horrible! It should be ACE, Mofo, KicknnN!, Shut yo mouth, just bring it!
:cool: :nod:
J/K but is there any degree of renaming the AI classes with out killing the system becasue I would work better with my own classifications (even if it was just in my copy of fred...).
Conflict GRDLA:
Operation Return To Riker
www.ARMOUREDSTAR.com - the latest site is not finished yet!
[What we have here is the source to the Freespace ENGINE, not the Freespace GAME. By allowing the ENGINE to support all kinds of cool stuff, we're allowing the creation of all new GAMES] - TurboNed

  

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Quote
Originally posted by LAW ENFORCER
I belive AI should only be set in fred however the diffrent tactics n moves etfc should be in the AI table. Do we have to use those anoying captain, colnal AI levels as they are just horrible! It should be ACE, Mofo, KicknnN!, Shut yo mouth, just bring it!
:cool: :nod:
J/K but is there any degree of renaming the AI classes with out killing the system becasue I would work better with my own classifications (even if it was just in my copy of fred...).


Okay. Either I`m misunderstanding something or that is the singularly most stupidly useless SCP modification I`ve ever heard suggested!

Why would anyone want to waste there time changing that (assuming that it can`t be changed on the tables at the moment anyway).

I can understand adding new classes, having more or better ones but changing the names? Why on Earth would you want to do that? :confused:
Who's going to see it? Just you! The player never sees it and the time you`ve spent re-editing the tables would have been better spent just learning how the current ones work.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Quote
Originally posted by LAW ENFORCER
I belive AI should only be set in fred however the diffrent tactics n moves etfc should be in the AI table. Do we have to use those anoying captain, colnal AI levels as they are just horrible! It should be ACE, Mofo, KicknnN!, Shut yo mouth, just bring it!
:cool: :nod:
J/K but is there any degree of renaming the AI classes with out killing the system becasue I would work better with my own classifications (even if it was just in my copy of fred...).

:wtf:
Have you actually looked in the ai.tbl?
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline IPAndrews

  • Disgruntled Customer
  • 212
  • This site stole my work
I think he was kidding about the names. The point about screwing up everyone's mission balance is a fair one. The solution is to keep the original AI code and interpret the existing ship type flags to be subsets of the new AI flags or options which means the game is running exactly the same code that it was running before.

Only now you have a mechanism for adding new AI behaviours and mixing behaviours from different ship types. No more need for hard coded "Gunship AI". It becomes a table problem. One that's easily resolved at that.
Be warned: This site's admins stole 100s of hours of my work. They will do it to you.

 

Offline LAW ENFORCER

  • Turret Fiend
  • 210
    • http://www.armouredstar.com
Well I was partialy jokeing but was really wondering (and was expecting people to say this part not "OMG A STUPID POST") if it could be done in like 5 mins (well I dont know do I? i helps me work!!! OK?!!?)

If its hard for you to do then disregard... simple as that - dont get so worked up over it, relax a bit... its not going to happen...
to your friends anyway...:wink:
Conflict GRDLA:
Operation Return To Riker
www.ARMOUREDSTAR.com - the latest site is not finished yet!
[What we have here is the source to the Freespace ENGINE, not the Freespace GAME. By allowing the ENGINE to support all kinds of cool stuff, we're allowing the creation of all new GAMES] - TurboNed

 

Offline diamondgeezer

Law Enforcer strikes again.

Look, it's this simple - open up your AI table and edit away. You've got a maximum of 40 slots to fill, so you won't need to overwrite what's all ready there. The stats are all explained within the table, so there really is nothing difficult about it. Happy modding.