Return to “General”

Post

Re: Combat Gameplay Discussion

#16
You're very correct, Flatfingers - I made a mistake. Thanks for catching that. :) It's fixed now.

Those were some very interesting reads, and I've developed a sort of "suggestion" for how Mr. Parnell could improve the combat mechanics just by fixing the AI up a bit, but procedurally.

This is something I've done myself with procedural AI. The upside is that it's powerful, simple, and intelligent. The downside is that it uses a lot of decimal numbers. You guys might think of a way to fix it, though.
I could give a link to a blog post if somebody wants it, but it's a personal blog, so I'm on the fence about it.

The idea behind it is, Josh hardcodes a number of tactics for the AI to utilize. The AI for each ship then does a quick calculation every so often through a fight, taking various factors into account, and these factors are each able to give "weight" to different AI tactics. Over time, the AI can procedurally adjust the weighted values to mold their attack plans specifically to suit not only the universe, but the faction as well. Over time, therefore, the AI will evolve and become smarter, by taking the outcomes of their decisions into account.

This is an analog AI system. Like a human, the combat AI would not appear to be simply binary if-then, and would be realistically weighted due to various factors.
For example, a person doesn't say, "the sun is shining, therefore I must go outside." A human says, "it's a nice day, kind of cool, not too cold, there's a little bit of a breeze, and it's kind of bright, but I haven't gotten much sun in a while, and I'm feeling pretty good," and then goes outside. They take analog values into account and these weight the final decision. I think this will bring a degree of realism to LT that is missing from most games. Even better, these values can be weighted not only per universe, but per faction and per NPC as well - you could see different fighting styles evolve across the universe - all evolving specifically to suit the technology that has emerged there.

As an added bonus, this same system could be used for capital ship AI, simply by means of the "Personal HP/average nearby enemy HP ratio" - this value could weight other values in order to keep capital ships from dogfighting, and help them target the appropriate enemies, so they'll attack stations rather than other ships.

I've done work with AI of this type before, and I can say with conviction that it is an incredibly accurate and precise system, after it has evolved enough. Not only that, but it is fairly quick to calculate as well, only needing tactic calculations every so often, although it needs moving waypoint calculations (so you can avoid enemy fire, for instance, or flank a ship.) We might actually have to limit the AI's capacity. :\

Here's a quick example. Let's say alliedShip has 250 HP, and enemyShip has 500 HP; this comes to an allied HP/enemy HP ratio of 0.5. This ratio value is connected to all targeting, positioning, range, and movement tactics: each potential tactic is given extra weight based on the ratio:

Code: Select all

allied HP/enemy HP ratio
          < 1  > 1
Tactic A: 0.5  1.1
Tactic B: 2.5  3.3
Tactic C: 0.1  0.7
Tactic D: 9.6  4.7

allied firepower/enemy firepower ratio
          < 1  > 1
Tactic A: 0.1  4.2
Tactic B: 5.2  0.3
Tactic C: 5.1  3.2
Tactic D: 1.6  0.7
Each tactic's weight is added to by (ratio * <1/>1 specific tactic value). Thus, in the above example, if the ratio was 3 for allied HP/enemy HP, that's greater than one, so Tactic A's weight would be increased by 3.3, Tactic B by 9.9, Tactic C by 2.1, and Tactic D by 14.1. The same is done for each of the other ratios that are being factored in, and after all the results are done, the game chooses the tactic that has the highest weight. It's a seemingly complex system, but actually very simple and adaptable when it comes down to it, as well as being easy to manipulate and change. Everything is controlled by decimal numbers.

For so many numbers, that's quite a bit of math... however, a lot of the math could be optimized to not take as long, and if you stagger the calculations, as well as only needing to check a ship's tactics once every ten seconds or so, it'll even out a bit.

As a final little bonus, if you multiply each weighting by a very small value (i.e. something on the scale of 0.9-1.1), you get a feeling of impulsivity. This small value could change per NPC, so that some pilots are more impulsive than others.


And here's some suggested tactics and such:

Tactics
Factors taken into account when weighting tactics: (where "reinforcements" are "ships and stations too far away to be drawn into combat, but still nearby")
(note: this list assumes that there are only two factions in a single fight. Other ratios such as "personal faction HP/weakest nearby attacking faction HP ratio" might be added so that ships could also target a single faction to wipe them out faster - making combat even smarter)
  • Personal HP/average nearby enemy HP ratio
  • Personal HP/average nearby enemy firepower ratio
  • Personal firepower/average nearby enemy firepower ratio
  • Total nearby Ally HP/Total nearby Enemy HP ratio
  • Total nearby Ally firepower/Total nearby Enemy firepower ratio
  • personal max speed/target max speed ratio
  • personal max range/target max range ratio
  • max nearby ally speed/max nearby enemy speed ratio
  • total nearby ally count/total nearby enemy count ratio
  • weakest nearby ally hp/average nearby enemy firepower ratio
  • weakest nearby enemy hp/average nearby ally firepower ratio
  • known allied potential reinforcement/known enemy potential reinforcement ratio
  • distance to target (not a ratio) (this actually enables the ship's strategy to change when it gets close, so it can dive bomb and then afterburner out, for instance)
The AI chooses one of each following list:

Target prioritizing:
  • nearest enemy priority percentage (just point and shoot)
  • nobody: ignore all and go about your business (a temporary truce/ceasefire, or just ignoring the pathetic ships that can't scratch your hull)
  • nearest ally's target priority percentage (team up to take enemies down)
  • most powerful(wep) enemy priority percentage (target large ships with big guns (or stations))
  • weakest(HP) enemy priority percentage (target fighters and heavily damaged craft)
  • weakest nearby ally's aggressor priority percentage (defend allied fighters)
  • most-attacked nearby ally's aggressor priority percentage (defend allied capital ships and heavily-targeted fighters)
Positioning while en route:
  • no preference (just point, fly and shoot) (what it does right now)
  • attack from behind (try to attack from the blind spot)
  • flank (attack from a different side as allies attacking same target)
  • stay close to allies while en route (band together)
  • stay away from allies while en route (simply don't get close to allied ships)
  • avoid other enemies while en route (just try not to get killed)
  • stay between enemies and known allied potential reinforcements (lure them into death, one parsec at a time)
Range:
  • no preference (just point, fly and shoot) (what it does right now)
  • short (stay on the enemy's tail)
  • medium (stay within range of the enemy, but not necessarily on top of them)
  • attack from just outside enemy's maximum range (taunt)
  • attack from personal maximum range (snipe)
  • get out of the combat zone (retreat) (putting it here gives you the advantage of being able to direct your retreat towards reinforcements)
Motion:
  • no preference: sit and fire (just point and shoot) (what it does right now)
  • strafe while firing (basically, just find the enemy's line of fire and move away from it - simple math)
  • dive bomb and afterburner out after a quick attack (charge and get out fast)
  • stay close and avoid all enemy lines of fire unless untargeted (dogfight. short and simple.)

Everything becomes simple here - all the various bits can procedurally mix and match, allowing for new tactics to emerge. This would create a very fun gameplay experience, with the added advantage that the AI will exploit all the same tactics you're likely to - and will probably exploit them first. :D

Enemies will also retreat when they're dying now. Entire fleets could retreat at once, as if given orders to fall back. Allied pilots could send you messages given their plan of attack: "I'm getting out of here!" "Let's take down that capital ship!" etc. They work together when it's useful as well, and know how to avoid enemy fire. Suddenly, there's a very good reason to approach from a specific side, and you don't have to micromanage absolutely everything anymore. As an added bonus, the AI can learn from its mistakes, and hone its "skills" through "damage dealt vs damage received", making it seem even more like specific pilots are better at combat than others - because they're literally gaining experience as they fight. Pilots that see combat often will eventually be far smarter combat-wise than those who don't. Not only that, but factions that see more combat will be better at it!

I suppose the primary downside is that there would be large arrays of numbers for the game to keep track of. The above system would contain a total of 624 decimal numbers. If you have specific values for the entire universe, as well as for each faction and each ship, and you're in a system with two factions and 512 ships... That's a total of 321,360 stored decimal numbers for a single system. If you're in a universe with 128 factions and 8192 ships, that's a grand total 5,192,304 stored decimals, just for combat AI. :shock: In a word, that's ludicrous. Of course, it could be pared down quite a bit... but it's still a potential problem, I suppose, unless we don't mind working with that many decimal numbers.
Last edited by Talvieno on Fri May 23, 2014 7:49 am, edited 3 times in total.
Have a question? Send me a PM! || People talking in IRC over the past two hours: Image
Image
Image
Post

Re: Combat Gameplay Discussion

#17
I think the tasks of keeping distance to friendly/enemy ships could be worked as an modificator of the pathfinding algorithm already in place, which uses flow fields.

So a ship with wants to stay at distance to enemy ships turns up the cost of maneuvering near them and vice versa.

The same also applies for friendlies.

This also makes friendlies staying together emergent.
As in areas where many friendlies are the "potential" of friendlies is very high there, causing friendly affine ships to go there.


Your system also has some "error" so to say.
It assumes no central command authority.
Which will likely be present, sone kind of executive NPC likely
Post

Re: Combat Gameplay Discussion

#18
Talvieno wrote:Over time, the AI can procedurally adjust the weighted values to mold their attack plans specifically to suit not only the universe, but the faction as well. Over time, therefore, the AI will evolve and become smarter, by taking the outcomes of their decisions into account.
If you assemble 12 factors into one value and then pick 1 of 4 tactics, how can the AI become smarter?
1. It would need to determine the success of the tactic, correctly observing all outside influences.
2. It would have to record all 12 factors at the time of the decision to be able to tell if the same tactic has been successful / unsuccessful in exactly this situation.

Learning is difficult. =)
There is no "I" in Tea. That would be gross.
Post

Re: Combat Gameplay Discussion

#19
Edit, ninja'd:
Gazz wrote:
Talvieno wrote:Over time, the AI can procedurally adjust the weighted values to mold their attack plans specifically to suit not only the universe, but the faction as well. Over time, therefore, the AI will evolve and become smarter, by taking the outcomes of their decisions into account.
If you assemble 12 factors into one value and then pick 1 of 4 tactics, how can the AI become smarter?
1. It would need to determine the success of the tactic, correctly observing all outside influences.
2. It would have to record all 12 factors at the time of the decision to be able to tell if the same tactic has been successful / unsuccessful in exactly this situation.

Learning is difficult. =)
Nah, it's easy. You just gauge how successful a tactic is by how much damage is dealt vs how much damage is received, and call that your success rating (weighted towards the average given/received, so that successful squadrons don't become stupid, of course). If they dealt more damage than received (weighted as aforementioned), then the AI is weighted slightly more towards those tactics from then on. If they received more damage than they dealt, it's weighted slightly less towards those tactics. With the addition of minor variations per personality (the "impulses" thing), it becomes a simple process of learning by trial and error. They'll actually learn fairly quickly, especially if the faction has a set of weighted values that changes for all the ships at once, all the time. Just average that out (or weight it) with the ship's personal values, and they'll learn without issue. Like I said, I've done this before, and I have a bit of experience with it. :P



Cornflakes and I had a chat about this in the IRC.
Here's the summarized points:

Storing 40 MB for the complete combat data of a universe full of 8192 ships and 128 factions isn’t that bad.
Most of them are variables you wouldn’t need to store permanently in the memory, and you can LOD them away when the ships are out of sight, so you only have to load 3 MB or so into the memory for a system full of ships.

This data allows the AI to evolve, and learn to fight more efficiently. The decimals represent combat weightings, so a ship knows what tactics to choose in what situations. To the player, it’s also a bit of personality and combat skill. Ships that see combat more often would have their values adjusted more often – “learning” more often – basically giving them more combat experience as they fight, and making them tougher opponents. While it would be conceivably possible to limit these variables to factions only, this was the primary reason I wanted per-ship weights.

The reason there are 624 floats is because there are two floats per tactic type, multiplied by one per factor. There are two floats per tactic type because they are related to the factor ratios. One is for ratios that are < 1, and the other is for ratios that are > 1, so that if, for example, your NPC is weaker than the enemy, it’ll give you different tactics than if your NPC is stronger than the enemy. Moreover, as they’re ratios, it takes into account how much weaker each is than the other as well.

Cornflakes suggested that you don’t make them strict tactics, but rather weighted percentages, so that you don’t have the tactic “keep by your friends”, but only “I should move closer to my friends”.

With all the values averaged out with a weight of the faction leader’s values, you get a sense of central command authority. If you give ships under your command a direct order, this gives those tactics a strong weight – not too strong, however. You will still be able to command your bomber squad, “destroy that carrier NOW, and not when you feel like it”. In addition, if you order your ships into a suicide mission, there’s a small chance that they will decide to retreat instead to save themselves. This small chance is related to how “loyal” they are to you – i.e. how much weight your orders carry. Loyalty could be derived from how long the pilot has been in your service, as well as their personality. This gives you an incentive to put rookie pilots through “combat training”, as well as permitting long-time employees with traitorous personalities to commit treason, regardless of their training.

What’s more, your commands could add weight to the factors and tactics so that your ships learn from your commands, and will be more likely to make those choices by themselves in the future. Telling your fleet to retreat all the time would essentially turn them into cowards, although of course how quickly this happens would be influenced by their personalities.

The system is very dynamic – that’s the central idea behind it. It’s so that the AI tactics are procedurally generated per universe, and that they can evolve over time, not only per universe, or per faction, but also per pilot, giving them personality and experience. Cornflakes and I agree that it’s just the type of thing Josh would probably love... although it might be a bit taxing on processing power. However, as the AI is currently nothing more than “point and shoot”, changing the AI at all will result in taxing the processor more.


Here's the log dump (slightly edited, removed an irrelevant conversation to make it more concise):
Spoiler:      SHOW
[11:01] <+Talvieno> Also, does storing 5,192,304 floats just for combat AI sound as ridiculous as I think it does? :P
[11:05] <+Cornflakes_91> Nah, 40mb for combat AI is not that bad xF
[11:07] <+Cornflakes_91> Are that 40mb for 512 ships?
[11:08] <+Cornflakes_91> That would not be so overburdening imo
[11:08] <+Cornflakes_91> With ram measuring in gigabyte
[11:08] <+Talvieno> nah, 8192 ships and 128 factions.
[11:08] <+Talvieno> it's for the universe.
[11:08] <+Cornflakes_91> Totally reasonable
[11:08] <+Talvieno> :\ Seriously.
[11:09] <+Talvieno> Lol, all right then.
[11:09] <+Cornflakes_91> most of them are dynamic variables which you would not need to store permanentely
[11:09] <+Cornflakes_91> Also you can LOD most of them away when the ships are out of sight
[11:09] == Mordakai [mibbit@142.222.224.119] has joined #limittheory
[11:09] == mode/#limittheory [+v Mordakai] by ChanServ
[11:09] <+Cornflakes_91> Or in another system
[11:10] <+Talvieno> When ships are in another system you could just unload most of the values altogether.
[11:10] <+thor446> hey mordakai
[11:10] <+Talvieno> Heyaa, Mordakai.
[11:10] <+thor446> hows college
[11:10] <+Cornflakes_91> So your 40mb just became 4 mb for ships in the system
[11:10] <+Cha0zz> hey Mordakai
[11:10] <+Cornflakes_91> +maybe 10 for all others
[11:11] <+Mordakai> Not bad, on a work term at the moment/
[11:11] <+thor446> i lost what you guys are saying, 40mb of ram to have 512 ships in the system?
[11:11] <+thor446> whatre you studying?
[11:11] <+Cha0zz> no
[11:11] <+Cornflakes_91> for talvienos combat AI
[11:11] <+Mordakai> Software Development.
[11:11] <+thor446> ah
[11:11] <+Cornflakes_91> And 8k ships
[11:11] <+Talvieno> Nah, Thor, 40 MB to store all the data for the combat AI for all ships.
[11:11] <+thor446> oh
[11:11] <+Talvieno> well, if you assume around 8k ships in a universe.
[11:11] <+Mordakai> Bit of everything, but mostly specialized in Web technologies.
[11:12] <+Cornflakes_91> more will not need any precise AI movement
[11:12] <+Cornflakes_91> I think the 8k are already far too much
[11:12] <+Talvieno> Same here, honestly, but I was aiming a bit high with that estimate. XD
[11:12] == Zeadar [~looking@d83-183-219-182.cust.tele2.se] has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
[11:12] <+Cornflakes_91> Maybe 4k would need any meaningful AI
[11:13] <+Talvieno> 4k would cut it down to about 20 MB of data.
[11:13] <+Cornflakes_91> Rest of them get LOD away pretty fast
[11:13] <+Talvieno> Although.
[11:13] <+Cornflakes_91> Still about 4mb for 512 in system
[11:13] <+Talvieno> If you don't want to store AI weights for each ship, but rather for each faction, that cuts it down to a megabyte or so.
[11:14] <+Talvieno> And if you want to just store AI weights that everything in the entire universe uses, that's practically nothing - just 600 numbers.
[11:14] <+Cornflakes_91> Limit it to per-executive
[11:14] <+Talvieno> I suppose. I'd like to see workers be just as much of a challenge to take down, though.
[11:15] <+Cornflakes_91> The "whole universe" weights could actually be seeded initially
[11:15] <+Cornflakes_91> I ment the static variables

[11:19] <+Talvieno> Got disconnected.
[11:19] <+Talvieno> [11:15] <+Cornflakes_91> I ment the static variables <--- last I got.
[11:19] <+Cornflakes_91> (+Cornflakes_91) the ones you need persistently
[11:20] <+Talvieno> And, they're not really static, they evolve to help the AI learn to fight more efficiently.
[11:20] <+Cornflakes_91> (+Cornflakes_91) Or maybe filter according to ship size
[11:20] <+Cornflakes_91> (+Cornflakes_91) The bigger the ship, the less of them exist the more memory you can afford per ship
[11:20] <+Cornflakes_91> (+Cornflakes_91) *oops* i did miscalculate
[11:20] <+Cornflakes_91> (+Cornflakes_91) Somehow mistook 64 bit float for 4byte... nevertheles
[11:20] <+Cornflakes_91> (+Cornflakes_91) Just multiply my memory claims by 2
[11:20] <+Talvieno> 80 MB?
[11:20] <+Cornflakes_91> 80mb
[11:20] <+Cornflakes_91> or did i?
[11:21] <+Cornflakes_91> Lol, 40mb were fine
[11:21] <+Cornflakes_91> 5mega*8byte...
[11:21] <+Talvieno> eh, well, if you only have factions learn, then it's not all that much, just around 600 floats per faction.
[11:21] <+thor446> was fine*
[11:22] <+Talvieno> The numbers represent combat weightings, so it knows what tactics to choose in what situations.
[11:22] <+Talvieno> To the player, it's also a bit of personality.
[11:22] <+Cornflakes_91> yeah
[11:22] <+Talvieno> And combat skill.
[11:22] <+Cornflakes_91> i see
[11:22] <+Cha0zz> what are you guys talking about?
[11:23] <+Talvieno> Combat AI.
[11:23] <+Cornflakes_91> talvienos A
[11:23] <+Cornflakes_91> AI
[11:23] <+Talvieno> viewtopic.php?f=2&t=2990&p=50171#p50171
[11:23] <+Cha0zz> talvienos ai?
[11:23] <+Cha0zz> ow ty
[11:23] <+Talvieno> Ships that see combat more often would have their values adjusted more often - "learning" more often - basically giving them more combat experience and making them tougher opponents.
[11:24] <+Talvieno> It was the main reason I liked the idea of per-ship static values.
[11:24] <+Cornflakes_91> That would not need 600 floats imo...
[11:24] <+Cornflakes_91> Per ship
[11:25] <+Diegetisor> Hi everyone :)
[11:25] <+Cornflakes_91> Hey diegetsior
[11:25] <+Talvieno> That's one per tactic, multiplied by two per factor.
[11:25] <+Cha0zz> Die Gest Isor
[11:25] <+Cornflakes_91> why two
[11:25] <+Cha0zz> all hail him
[11:25] <+Cha0zz> for he is the dark one and darkness will come
[11:25] <+Cornflakes_91> All hail S-ATA-N
[11:25] <+Talvieno> Or, wait, two per tactic by one per factor, lol
[11:26] <+Diegetisor> Night is dark and full of terror
[11:26] <+Talvieno> Heyaa, Diegetisor.
[11:26] <+Cornflakes_91> I forgot the response to that line gestior
[11:26] <+Talvieno> And Cornflake - two because there's a >1 and a <1 value, so that if you're weaker than the enemy, it'll give you different tactics than if you're stronger than the enemy.
[11:26] <+Diegetisor> http://cdn.shopify.com/s/files/1/0246/7 ... 1381657747
[11:26] <+Cornflakes_91> Ah
[11:26] <+Talvieno> And as they're ratios, it also takes how much weaker each is than the other into account, too.
[11:27] <+Diegetisor> There's no answer (or I don't remember it)
[11:27] <+Cornflakes_91> I would not make it strict tactics
[11:27] <+Cornflakes_91> Just weights
[11:27] <+Cornflakes_91> To change a value
[11:27] <+Talvieno> Yeah, you could do that too.
[11:28] <+Cornflakes_91> So that you dont have the tactic "keep by your friends" but only "i should move closer to my friends"
[11:28] <+Cornflakes_91> Everything gets flowing and fluid
[11:28] <+Talvieno> And with those values averaged out with the faction leader's values, you get a sense of central command authority.
[11:28] <+Talvieno> so I did take that into account, too.
[11:28] <+Cornflakes_91> or the commander issues direct order
[11:29] <+Cornflakes_91> S
[11:29] <+Talvieno> Then you just override the tactical values.
[11:29] <+Cornflakes_91> And this order becomes a strong weight
[11:29] <+Talvieno> Yup.
[11:29] <+Talvieno> Not too strong, though.
[11:30] <+Cornflakes_91> i'd still like to be able to order my bomber squad to destro that carrier NOW and not when they feel like it
[11:30] <+Talvieno> It'd be awesome to see the enemy fleet flee before you while their commander orders them to stand their ground.
[11:30] <+Talvieno> You know, just because your fleet is a hundred times bigger.
[11:30] <+Cornflakes_91> thats just an balance factor
[11:30] <+Talvieno> Yup.
[11:30] <+Talvieno> And you could still order your bomber squad to destroy a carrier, too.
[11:30] <+Cornflakes_91> the commanders weight could be the loyality factor
[11:30] <+Talvieno> And, what's more - you could add that to the weights so that they learn from your comands. :)
[11:31] <+Talvieno> *commands
[11:31] <+Talvieno> ^--- hey, I like that idea. Loyalty factoring in, that's nice.
[11:31] <+Cornflakes_91> so the more loyal they are the more weight the commanders orders have
[11:31] <+Talvieno> Brilliant. :) Gives you a very strong incentive to make your pilots loyal and treat them well.
[11:32] <+Talvieno> or... make them loyal [by] treating them well, rather.
[11:32] <+Talvieno> not sure what "treating them well" would be, though.
[11:32] <+Cornflakes_91> But that would lead right where josh has gone away by making most of the AI's slavishly loyal
[11:32] <+Talvieno> Hrm.
[11:33] <+Talvieno> OH. Maybe it's just how long they've been in your service?
[11:33] <+Cornflakes_91> meh
[11:33] <+Talvieno> The new recruits wouldn't take your orders as seriously, perhaps... combat training would fix it.
[11:33] <+Cornflakes_91> Long time employees could stil commit treason
[11:33] <+Talvieno> True.
[11:33] <+Cornflakes_91> Regardless of their training
[11:33] <+Talvieno> I suppose personality factors in as well, then.
[11:34] <+Cornflakes_91> Which is where josh has gone away because of processor needs
[11:34] <+Cornflakes_91> You should dump this discussion into the thread
[11:34] <+Talvieno> well, this wouldn't need much in the way of processor power. It's mostly just stored numbers.
[11:35] <+Talvieno> One main calculation per ship per ten seconds or so.
[11:35] <+Cornflakes_91> which most are dynamic
[11:35] <+Cha0zz> maybe tie loyalty with how much your goals/personalities are aligned?
[11:35] <+Cornflakes_91> And need recalc
[11:35] <+Talvieno> very dynamic - that's the idea behind it. =P It's so that the AI tactics are procedurally generated per universe, and so that they can evolve over time.
[11:36] <+Talvieno> It's just the type of thing Josh would love.
[11:36] <+Cornflakes_91> I knoe
[11:36] <+Cornflakes_91> I love it too
[11:36] <+Talvieno> lot of numbers, though.
[11:36] <+Cornflakes_91> But it would be very taxing on processing power
[11:36] <+Talvieno> Nah, not really... Well.
[11:37] <+Talvieno> No, not really.
[11:37] <+Talvieno> Right now, the ships do one thing.
[11:37] <+Talvieno> Point, move within range, and fire until one ship is dead. That's all they do. :P
[11:37] <+Cornflakes_91> Lots of distance functions, which need to be iterated over all ships in range..
[11:37] <+Talvieno> Any form of advanced AI is going to tax the processing power somewhat.
[11:37] <+Talvieno> And no - I've already figured that out, really.
[11:38] <+Cornflakes_91> Hm
[11:38] <+Cornflakes_91> The AI already was better
[11:38] <+Cornflakes_91> As i already explained
[11:38] <+Talvieno> Did you play the prototype, by the way? meant to ask that.
[11:38] <+Talvieno> The prototype tutorial video just had most of the ships sitting there and firing.
[11:39] <+Talvieno> Really good example of it right at the end.
[11:39] <+Cornflakes_91> And he will bring it at least up to that level again
[11:39] <+Cornflakes_91> It did not have high-order tactic tough
[11:40] <+Cornflakes_91> From what i remember they were circling their targets at maximum angular velocity, using max range of their weapons
[11:40] <+Talvieno> I suppose so. No matter what he does, though, it'll put more work on the processor.
[11:40] <+Talvieno> ack.
[11:40] <+Talvieno> so, strafing.
[11:40] <+Cornflakes_91> Dunno if that already was in the prototype or somewhat later while still using the old UI
[11:40] <+Cornflakes_91> Not exactly starfing
[11:40] <+Talvieno> well, circle-strafing.
[11:40] <+Cornflakes_91> As they all had turrets
[11:41] <+Cornflakes_91> (I see strafing as using lateral trusters to circle your enemy while pointing your nose at him)
[11:41] <+Talvieno> That bumps the AI level up to 2/5 for vsEnemy, and still at 1/5 for vsAlly.
[11:41] <+Talvieno> Ahhhhhhh. Okay, point taken.
[11:42] <+Talvieno> Still, with everything having omnidirectional weaponry, it's still basically strafing.
[11:42] <+Cornflakes_91> Or even just using lateral thrust
[11:42] <+Cornflakes_91> "Circling" :P
[11:42] <+Talvieno> Just moving perpendicularly while you fire, so it comes down to "who has better aim?"
Last edited by Talvieno on Thu May 22, 2014 10:15 am, edited 1 time in total.
Have a question? Send me a PM! || People talking in IRC over the past two hours: Image
Image
Image
Post

Re: Combat Gameplay Discussion

#20
Talvieno wrote:[...]
This all reminds me of the work I did on reinforcement learning for Robocup agents using argumentation frameworks last year.

The idea is that you have something called an argumentation framework, which is a tuple of the form (Arguments, Attacks).

Arguments is a set of arguments, which each have the form: action IF premise. That is, it recommends a particular action/tactic if certain conditions are met.

Attacks is a binary relation of the form (Arg, Arg); Attacks(A, B) is read as "A attacks B", and this essentially means that one argument is being used against another argument - like how we may attack each other's arguments if we think they're wrong.

Arguments attack each other and can defeat each other, and from this you can get the "winning" set of arguments - preferably just a single argument, and then you can pick the action/tactic taht it recommends.

There's also a thing called value-added argumentation frameworks in which arguments can also be used to promote "values" (what you decide as a value is up to you - how much damage a tactic will inflict on an enemy vessel in a space game, for instance). With these AF's you include a thing called an audience, which is a strict partial ordering of these values, and this partial ordering helps decide which argument/s win/s in the case that attack relations are not sufficient by themselves. This value preferencing means that an attack such as "A attacks B" may fail if B promotes a higher value than A. In other words, in a value-added argumentation framework, "A defeats B" if and only if "A attacks B" and val(A) >= val(B).

tl;dr: an agent debates different arguments like a crazy person and goes with whatever argument wins.

If Josh (or anyone else) is interested in implementing argumentation-based reinforcement learning for agents in Limit Theory, I recommend this paper to start off with.
Post

Re: Combat Gameplay Discussion

#21
ThymineC wrote:tl;dr: an agent debates different arguments like a crazy person and goes with whatever argument wins.
Yeah, pretty much, lol. That initial learning period could be very easily solved, however, by setting default values. My suggestion would be to run a number of universes, let the AI evolve, then take those values, average them out, and there's your default AI, averaged out to what the average tactics for the average Limit Theory universe should be.

Learning through trial and error is a powerful tool for AIs. Unlike people, computers remember that something doesn't work the very first time, and can remember exactly why it didn't work, too - and they never forget.
Have a question? Send me a PM! || People talking in IRC over the past two hours: Image
Image
Image
Post

Re: Combat Gameplay Discussion

#22
Talvieno wrote:
ThymineC wrote:tl;dr: an agent debates different arguments like a crazy person and goes with whatever argument wins.
Yeah, pretty much, lol. That initial learning period could be very easily solved, however, by setting default values. My suggestion would be to run a number of universes, let the AI evolve, then take those values, average them out, and there's your default AI, averaged out to what the average tactics for the average Limit Theory universe should be.
Have you come across this btw?

Same idea just with genetic algorithms. So many different ways to make AI smart.
Post

Re: Combat Gameplay Discussion

#24
Mr. Parnell wrote: It's been a while since I actually participated in LT combat myself, and I know I still need to give a little love to the dogfighting AI as well as the HUD. Doing so afforded a nice break from the conceptual gauntlet of the past few days :shock:

Dogfighting is fun. I'm not going to lie, there's just something about the balance of the thrust and torque in a small fighter, the ratio between ship speed and bullet velocity, and the general beauty of the LT universe that makes for a darn good time.

That being said, it's still lacking the raw fun quality of those Freelancer dogfights, mostly because the AI is not yet as interesting. I also feel that I'm lacking HUD feedback. IIRC, in Freelancer there were a number of subtle cues that added to the visceral quality of dogfights. Markers indicating the direction of any projectiles that hit you. Arrows pointing in the direction of off-screen ships. Animation of the cursor when hovered over an enemy. I'm working on getting these kinds of details into the HUD so that we can feel more engaged during battles.

In case you're wondering, no, I didn't win very much today :lol: I'm having just a tad bit of trouble getting the lead indicator integrated back into the HUD, and without any lead indicator or auto-aim, I'm just...well...a bit inadequate at aiming :oops: Suppose I've been practicing on large, stationary targets for too long. Sorry, asteroids :( To be remedied shortly!! :cool:

Fleets and Formations

With the revisitation of combat, I feel it's finally time to formalize and finalize fleets and formations. I'll need to give a little more thought to the theory, but we've already established a lot of good content on the forums back in the day (especially around the time of the prototype). I suppose, at this point, I'm most interested to see what I can do with coordinating fleet AI :)

---

I'll be honest, I think I'm going to continue for another day with this fun combat work :D I need a mental break before I go back to...the beast...
It looks like he just might have seen this thread! :) Now that it's definitely relevant, let's get this discussion moving again! There's a lot we can discuss here to give Mr. Parnell ideas, and we may only have a day or two to do it before he goes back to trying to figure out the economics, so how about we make things easier for him?

HUD feedback, dogfighting AI, tactics, ship-to-ship communication and teamwork - let's get some discussion, ideas and links going in here. :) Also, in particular, he mentioned:
Mr. Parnell wrote:I'll need to give a little more thought to the theory, but we've already established a lot of good content on the forums back in the day (especially around the time of the prototype).
I don't suppose anyone knows of these threads, do they? I was only just discovering LT around the time of the prototype, but I'm sure collecting these threads with links would probably be helpful to him, if he's focusing on that soon.


I'll shut up now - I'm just a bit excited. :D
Have a question? Send me a PM! || People talking in IRC over the past two hours: Image
Image
Image
Post

Re: Combat Gameplay Discussion

#25
Some people might find this article interesting.

Though this is based on real physics, if LT could merge rule of cool with reality.

Some ideas I found particularly interesting
Attitude maneuvers would be critical to point the main engine of a space fighter to set up for a burn, or to point the weapons systems at an enemy. Either way, concealing the attitude maneuvers of the space fighter would be important to gain a tactical advantage. So I think gyroscopes ("CMGs," in the spacecraft lingo) would be a better way to go – they could invisibly live entirely within the space fighter hull, and wouldn't need to be mounted on any long booms (which would increase the radar, visible, and physical cross-section of the fighter) to get the most torque on the craft. With some big CMGs, a spacecraft could flip end-for-end in a matter of seconds or less. If you come upon a starfighter with some big, spherical bulbs near the midsection, they are probably whopping big CMGs and the thing will be able to point its guns at you wherever you go.
This inspired the idea of slow but silent maneuverability via invisible thrusters called gyros and rapid gyroscope turns that don't affect direction (if large enough gyros are equipped)
Explosions are basically a waste of energy in space. On the ground, these are devastating because of the shock wave that goes along with them. But in the vacuum of space, an explosion just creates some tenuous, expanding gases that would be easily dissipated by a hull. No, to damage spacecraft systems, you can't hit them with gas unless it's really, really concentrated and energetic. So unless you want to just wait till your enemy is close enough that you can point your engines at him, the best bets for ranged weapons are kinetic impactors and radiation.

A kinetic impactor is basically just a slug that goes really fast and hits the enemy fighter, tearing through the hull, damaging delicate systems with vibrations, throwing gyroscopes out of alignment so that they spin into their enclosures and explode into shards, puncturing tanks of fuel and other consumables, or directly killing the pilot and crew. You know…bullets. But it sounds much more technical and science-fictiony to say "mass driver" or "kinetic lance" or something of the sort...the most effective kinetic space weapons would be either flak shells or actively thrusting, guided missiles. The flak shells would explode into a hail of fragmented shards, able to tear through un-armored systems of many craft at once without the shell directly hitting its target, or able to strike a target even after it tries to evade with a last-minute engine burn. The missiles would be a bit different from the missiles we are used to on Earth, which must continuously thrust to sustain flight. In space, such a weapon would rapidly exhaust its fuel and simply become a dummy shell. No, a space missile would either be fired as an unguided projectile and power up its engine after drifting most of the way to its target, or it would fire its engine in sporadic, short bursts. A definite downside to kinetic weapons on a starfighter is that they would impart momentum to the fighter or change its mass properties. Very large cannons or missiles might therefore be impractical, unless the fighter can quickly compensate for what is essentially a large rocket firing. Even that compensation might give the enemy just the window he needs…
Here, my ideas are that there are particularly sensitive points like gyroscopes that if damaged completely eliminate reliable control of direction, and perhaps even blow up other parts of the ship.

The other idea is that kinetic weapons act as thrusters as well, even though LT is not newtonian, it can still have pseudo recoil.
Radiation-based weapons that burn out the electronics of a spacecraft sound exotic, but are still potentially achievable. This would be the attraction of nuclear weapons in space: not the explosion, which would affect just about nothing, but the burst of energetic particles and the ensuing electromagnetic storm; such a burst would have to be either pretty close to the target vessel to scramble its systems, or it would have to be made directional in some way, to focus the gamma-ray and zinging-proton blast. But while we're talking about focused energy weapons, lets just go with a tool that we already use to cut sheet metal on Earth: lasers. In space, laser light will travel almost forever without dissipating from diffraction. Given a large enough power supply, lasers could be used at range to slice up enemy warships. The key phrase there, though, is "given a large enough power supply." Power is hard to come by in the space business. So, expect space laser weapons to take one of three forms: small lasers designed not to destroy, but to blind and confuse enemy sensors; medium-sized lasers that would be fired infrequently and aimed to melt specific vulnerable points on enemy space fighters, like antennae, gimbals, and maneuvering thrusters; and large lasers pumped by the discharge from a large capacitor or similar energy storage device to cut a physical slice into the enemy craft wherever they hit. Such a large weapon would likely only be fired at the very beginning of a battle, because the commander of a ship with such a weapon would not want to keep his capacitor charged when it might unexpectedly blow its energy all at once once he's in the thick of things.
I tend to like the idea of lasers as more specialized equipment while ballistics do the main damage.
To the 3 laser levels he speaks of, here are some ideas.
Almost all ships will have numerous little lasers all around them which can target low level sensors and blind passive detection or create false positives around the ship, making targeting more difficult. the laser equivalent of a smokescreen.

I think it would be cool if you could fire a bouy or drone which was simply covered in these lasers to act as remotely detonated smokescreens, which could fill the hud / sensors with false positives to either hide in a dogfight or to appear as a much larger force to damage morale... until the battery runs out.

medium lasers would really only target sensors, gimbals, and thrusters, avoiding hulls entirely.

Large lasers could blow through hulls and even take out small ships if they hit but would need to charge up according to their power, and if damaged to a certain level during the charge, will explode and possibly even take out the ship. (would make a deathstar possible but very risky)
What do we do to hit them on the ground? Well, strategic weapons from space are easy: kinetic impactors again. You chuck big ol' spears, aerodynamically shaped so they stay on target and don't burn up in the atmosphere, onto ground targets and watch gravitational potential energy turn into kinetic energy and excavate you a brand-new crater.
I love the idea of kinetic Spears launched from space for planetary bombardment, I believe that the US even considered this, was project Zeus or something... even if there are other ways to bomb planets, this should be an option too.
Image
When you're trying to fill an infinite multiverse, if you're not willing to consider the entire creative output of humanity as a starting point, you're wasting your time.
User: JoshParnell is accountable for this user's actions.
Post

Re: Combat Gameplay Discussion

#27
Agreed, rule of cool prevails, but taking some ideas from reality can be useful...Not to mention appealing to the realism fans.
Image
When you're trying to fill an infinite multiverse, if you're not willing to consider the entire creative output of humanity as a starting point, you're wasting your time.
User: JoshParnell is accountable for this user's actions.
Post

Re: Combat Gameplay Discussion

#28
In my opinion, when it comes to combat, Fun > RuleOfCool > Reality. In other words, fun comes first. One of the first things they teach you when you're taking game design courses is that in a game, "Fun" comes from a series of decisions. These decisions can be "problems" or "choices" - but while true gameplay depth comes from actual "choices", most decisions you make in a game come in the form of "problems". (Problems are decisions that have a singular best course of action, while choices have pros and cons that may make it impossible to tell at any point which path is best.)

A minor source of fun is learning the underlying rules of a game, particularly to the more intellectual crowd, but unless this is extremely difficult to do, it doesn't last very long.

Finally, something that adds to the game only by increasing the difficulty isn't something that will be enjoyed by most people: Take platforming challenges in first-person shooters, for instance. There is no choice involved - only a lot of deaths that only happen because the player isn't skilled enough - which isn't really the player's fault. If the player dies and there's nothing they can do to prevent it (i.e., no decision made recently that led to the demise), that very seriously detracts from the level of fun.


All that said, I do believe that realism can be implemented into a game in a way that makes it still fun. It just hasn't been done very well in spacegame combat yet. :P

This inspired the idea of slow but silent maneuverability via invisible thrusters called gyros and rapid gyroscope turns that don't affect direction (if large enough gyros are equipped)
This doesn't really bring anything fun to the game, honestly - it's an idea, and could be a design element, but it's not going to make the game any more fun than it is. In fact, it might make it a little more difficult without there being any true decisions, which detracts from the fun.
Explosions are basically a waste of energy in space. On the ground, these are devastating because of the shock wave that goes along with them. But in the vacuum of space, an explosion just creates some tenuous, expanding gases that would be easily dissipated by a hull.
Josh already implemented explosions. XD
A definite downside to kinetic weapons on a starfighter is that they would impart momentum to the fighter or change its mass properties. Very large cannons or missiles might therefore be impractical, unless the fighter can quickly compensate for what is essentially a large rocket firing.
I'm all for this. It's an excellent example of the "problem" type of decision: It makes you have to weigh the pros and cons of all-out firing. Something similar to this you see in a lot of games are weapon cooldown times (Mass Effect 1, for instance), and ammo clips. Weapon recoil strong enough to slow your ship down would be an excellent reason to leave the heavy guns for the larger ships, and make you really have to weigh your options before you start all-out firing, especially if you're trying to chase someone down.
Here, my ideas are that there are particularly sensitive points like gyroscopes that if damaged completely eliminate reliable control of direction, and perhaps even blow up other parts of the ship.
I'm against this. There's no way to keep these areas from getting destroyed, other than not getting hit - and in a dogfight, you're going to get hit. If these areas are destroyed, it essentially spells your doom, so in this case, it's basically you losing because it's the game's fault, which isn't fun.

The other idea is that kinetic weapons act as thrusters as well, even though LT is not newtonian, it can still have pseudo recoil.
I'm for this, as I said above. =P It would only really be noticeable on small fighters, or large guns on large ships. Either way: it sounds fun.
expect space laser weapons to take one of three forms: small lasers designed not to destroy, but to blind and confuse enemy sensors; medium-sized lasers that would be fired infrequently and aimed to melt specific vulnerable points on enemy space fighters, like antennae, gimbals, and maneuvering thrusters; and large lasers pumped by the discharge from a large capacitor or similar energy storage device to cut a physical slice into the enemy craft wherever they hit.
Blinding and confusing sensors might seem fun, until you're on the receiving end. At that point, you lose, and it's the game's fault. Lasers as a weapon against hulls aren't that helpful unless they're large-scale, and therefore, should be a specialized thing for larger ship. As others have pointed out, it's an energy weapon, and would probably work best against shields. With that in mind, you don't really have to worry about small-scale lasers being useless - as long as you have a laser, you can sap an enemy's shields away.
Large lasers could blow through hulls and even take out small ships if they hit but would need to charge up according to their power, and if damaged to a certain level during the charge, will explode and possibly even take out the ship. (would make a deathstar possible but very risky)
The first part, I like. Anti-fighter beams should be a thing. It would make targeting these weapons a major priority (and add another tactical level to the AI thing I put up). The second part... well. Capacitors don't work that way. Take it from someone who used to be training to be an electrical engineer. Electrical devices do not explode unless you're in a movie.


Now, I strongly agree with Cornflakes that as a rule, realism != fun when it comes to space combat. They were very unrealistic in that article. Realistically, you're not going to fight in space anywhere you can see the target. It'll happen out of visual range, with two ships launching projectiles at each other along their trajectories. Even lasers would work this way. There's no reason to get close, because if you have to retreat, you don't want to have to cover all that ground again. In addition, slowing down in space is VERY, VERY HARD. If two ships got into dogfight range, the entire fight would be over in nanoseconds, because they would fly past each other at such great velocities. Traditional weaponry would be worthless. Thus, railguns - and they don't even have to be railguns. If you simply manage to get any sort of projectile in the way of a ship, no matter how slow-moving said projectile is, it would rip a considerable portion out of the ship's hull. A major danger in the Cassini-Huygens mission to Titan was that the craft could encounter sand-sized particles while moving between the rings of Saturn. Just one particle would have ended the entire mission, if it hit in the right place. Space is scary. Space combat is boring. Really, the only interesting part about space is space, if we're being realistic.



One last thing, though. Right now, with the complete absence of windows on ships, it's exceeding difficult to judge size/distance of a particular ship. In the last update, it was hard to tell if a ship was big, or if you were just very close, for instance, even at the highest graphics level. If we don't want to add windows on ships, we should at least do something else to make it a little more obvious how big a ship is.
Have a question? Send me a PM! || People talking in IRC over the past two hours: Image
Image
Image
Post

Re: Combat Gameplay Discussion

#29
Talvieno:
Regarding your pilot AI, there might be a way to keep it more compact in the case of LT. Considering the latest I heard regarding ship control, being that any AI "Player" can have direct command over any ships they obtain themselves, instead of having combat AI defined individually per instance of a ship, why not instead generalize it across ship type?
From the player's point of view, this also means that any ship they own of a specifc type will behave consistently, and I would argue, make it a better experience from a command gameplay fun factor. Trying to deal with the fact that every fighter Model XG3 behave differently would cause more frustration than the emergent gameplay may be worth.
As well, generalizing for each type of ship as opposed to ship instance, as I mentioned, would allow to reduce the amount of stored data overall.

the only issue I'd see then would be for pilot "crew" and Josh's current concept of "leveling up". Effectively, what does a pilot leveling up bring as a benefit then? if the Tactics employed are faction-wide, then that can't be a resulting effect. Maybe just acurracy/maneuvering speed, though that may just be a gimmicky +1 X stats, lacking any specific depth. (not to say it's necessary to have absolute depth in this respect)
Post

Re: Combat Gameplay Discussion

#30
FireryRage wrote:Talvieno:
Regarding your pilot AI, there might be a way to keep it more compact in the case of LT. Considering the latest I heard regarding ship control, being that any AI "Player" can have direct command over any ships they obtain themselves, instead of having combat AI defined individually per instance of a ship, why not instead generalize it across ship type?
From the player's point of view, this also means that any ship they own of a specifc type will behave consistently, and I would argue, make it a better experience from a command gameplay fun factor. Trying to deal with the fact that every fighter Model XG3 behave differently would cause more frustration than the emergent gameplay may be worth.
As well, generalizing for each type of ship as opposed to ship instance, as I mentioned, would allow to reduce the amount of stored data overall.

the only issue I'd see then would be for pilot "crew" and Josh's current concept of "leveling up". Effectively, what does a pilot leveling up bring as a benefit then? if the Tactics employed are faction-wide, then that can't be a resulting effect. Maybe just acurracy/maneuvering speed, though that may just be a gimmicky +1 X stats, lacking any specific depth. (not to say it's necessary to have absolute depth in this respect)
it cannot be made really "remote controlled" as talvienos AI is more or less an expansion on pathfinding too.
as almost everything ties into pathfinding.

and every ship needs pathfinding local

Online Now

Users browsing this forum: No registered users and 3 guests

cron