Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
[Java MOO] Thoughts on game difficulty

(March 8th, 2016, 02:47)Hail Wrote: F.E.A.R's AI uses GOAP.
S.T.A.L.K.E.R.S.'s A-Life uses GOAP.

besides GOAP (and rulebased) there many other AI techniques: behavior trees, finite state machines, hierarchical finite state machines, genetic algorithm(s), neural networks, etc.

Are you a software developerr? Which of these AI techniques have you personally implemented in a video game? I'd like to hear your analysis of the pros and cons of each.

(March 8th, 2016, 02:47)Hail Wrote: imo I would avoid any plans to make anything the best ever. it has to be "good enough", otherwise you will never release your game.

I'm sure I'll manage. Thanks.
Reply

(March 8th, 2016, 07:38)Ray F Wrote: Are you a software developerr?
no, I am employed in a different field.

I know C++ and write code from time to time for my own personal enjoyment.

(March 8th, 2016, 07:38)Ray F Wrote: Which of these AI techniques have you personally implemented in a video game? I'd like to hear your analysis of the pros and cons of each.
none
me on civfanatics.com
An ideal strategy game would tone down efficiency challenges, while promoting choices and conflicts
No gods or kings. Only Man.
Reply

(March 8th, 2016, 08:01)Hail Wrote:
(March 8th, 2016, 07:38)Ray F Wrote: Are you a software developerr?
no, I am employed in a different field.

I know C++ and write code from time to time for my own personal enjoyment.

Cool. What field are you employed in?
Reply

(March 8th, 2016, 08:32)Ray F Wrote: Cool. What field are you employed in?
electricity meter data aggregation and reporting (submitting) that data to other organizations.
me on civfanatics.com
An ideal strategy game would tone down efficiency challenges, while promoting choices and conflicts
No gods or kings. Only Man.
Reply

(September 22nd, 2015, 19:42)Ray F Wrote: Since this seems like the go-to forum for experienced MOO1 players, I'd like to discuss some ideas for introducing player difficulty (Easy, Average, Hard, etc) into the game.

For starters, I do not like allowing the AIs to cheat. Anything that the AI does that the player cannot do is a cheat. Anything the player can do that the AI cannot is a cheat for the player.

Strictly speaking, this is unattainable. Shortcomings of the AI are unavoidable in practice, esp. in a game as complex and feature-rich as MOO. E.g. say an AI is incapable of designing and using special purpose scanner ships to spy the stats of opponent fleets. Would you then really consider the use of scanner ships by the player as cheating? Sometimes the current MOO AI is poor at evaluating the subjective value of certain techs. Does this make tech-trading cheating?

MOO is by design an asymmetric game. Not only wrt. player vs. AI but also between different races. While it is certainly a worthy goal and improves immersion to level the playing field between AI and player (and also allows for a more elegant software design), it is less important with MOO than with most other games - with abstract 2-player games like chess being at the other end of the spectrum.

Quote:I don't want to go down the path of giving various bonuses to the AI because that tends to be opaque and frustrating to players.

From a thematic POV, a certain opaqueness about such things is in fact a plus. By this I do not mean that the boni should not be well documented - they should be (and they should be customizable as an option) but the game should not rub them the player under his nose. This also means, that the boni should be restricted to areas without direct player-AI interaction, so the battlescape should be taboo, economy is fair game and diplomacy is sort of a grey area: While there is player-AI interaction, there are no hard rules for the player (making him perfectly incalculable, so here we are completely asymmetric) while AI-diplo is rules bound and cannot be rational or objective to begin with. If it were, the AIs would always gang up on the human, declare de-facto final war in 2301 and vote the strongest AI president at the first opportunity - no fun at all, but the optimal solution. Also there are racial and leader traits supposed to provide flavor.

Quote: What I'd rather do is create a system where the player can give himself strengths or weaknesses in order to get the difficulty level to something he'd prefer. This should theoretically have the same effect as making broad changes to the AI (as in other games), but in a way that the player controls when he sets up the game.

Theoretically, yes. Psychologically, less so - it's usually more motivating to overcome a stronger opponent than to overcome the same opponent with a handicap (think sports - what you'd rather see: jumping as high a possible or jumping a fixed height, but with the most heavy ballast backpack'?). And for playability, it is much better to change the AI-rules than the player rules, so managing his own empire works and feels the same, regardless of difficulty level. Tech cost might be ok (as it changes anyway between races and techlevels) - but having one factory sometimes provide 1.1 and sometimes 0.9 units of raw-production would be cumbersome to deal with.

Quote:For example, a player may choose various attributes for his race:
Strong: +20% production, Weak: -20% production
Smart: +20% research, Dumb: -20% research
Beautiful: +20% diplomacy, Ugly: -20% diplomacy
Brave: +20% combat bonus, Cowardly: -20% combat penalty
Stealthy: +20% spying, Clumsy: -20% spying

Nothing wrong with allowing special customizations or even a race editor, but this cannot replace standard difficulty levels. The former can go along existing race-specialities and might be fully visible, the latter should be as broard and generic (so as not to shadow the racial effects) and as "invisible" (to not break immersion) as possible. A moderate linear production / tech bonus plus maybe a little bit of initial planetary reserve and some generic diplomacy modifier (AIs are more patient with the player on lower and more aggressive vs. the player on higher levels) should really be all that's needed. These provide 3 parameters to tune for early expansion, overall growth and diplo (as this provides an extra way to win, it makes sense to have specific tuning).

Another reason for generic difficulty levels is to provide standardization, comparability, orientation and ease of communication about the game - esp. for newbies, while customization is more for veterans (these, of course, are the majority of the readers here). In fact, it should not be too hard to have both and under the hood, everything can be be treated as just another racial parameter.

ignatius
Reply

Necro'd!

For tactical combat, I think it makes sense to have the AI be as strong as possible -- no matter the difficulty.

A few reasons.
1) Flaws in tactical AI are really noticeable and can drastically hurt immersion.
2) A cheating AI in the tactical combat would be infuriating so you can't take any shortcuts here to overcome strong players.
3) Can help new players find ways to fight when they notice that the AI is using smaller number of weaker ships to better use. (Repulsers against range 1 weapons). A crippled tactical AI may teach new players bad habits.
4) Ability for 'auto' combat toggle for the player to let the same AI take over his/her battles. Some players may want this type of 'auto resolve' while watching the 2 fleets duke it out. This auto-combat should be just as strong no matter if the player is playing on beginner or impossible.

Outside of combat I think you have 1 really really big lever to push/pull for both the AI and players--%economy. This multiplier updates the BC output of the previous turn for the next turn. Typically 1.0.

An easy game would have the player at 1.2 and AI at 0.8. A normal game would be 1.0 1.0. A pretty hard game would be 0.8 and 1.2. It wouldn't have to by symmetric. Maybe the player wants 1.2 and AI at 1.6. This would be quite hard but play much faster. Whereas 0.8 and 0.6 would be in the player's favor but play slower. (Totally making up these numbers by the way--they could be way off and 1.05 and 0.95 may make more sense).

I don't think it makes as much sense to alter individual sliders (research/production) from a difficulty point of view (for race customization, of course it works). Difficulty wise I think the AI can (transparently) cheat by acknowledging that they will have simply have a larger economy as defined by the player.

Another fairly straight forward, transparent cheating mechanic is that AI's start with more population, factories, and ships.
Reply

(November 18th, 2016, 08:52)Reformations Wrote: Necro'd!

For tactical combat, I think it makes sense to have the AI be as strong as possible -- no matter the difficulty.

I definitely agree, for all four of your reasons.

Quote:Outside of combat I think you have 1 really really big lever to push/pull for both the AI and players--%economy.  This multiplier updates the BC output of the previous turn for the next turn.  Typically 1.0.

An easy game would have the player at 1.2 and AI at 0.8.  A  normal game would be 1.0 1.0.  A pretty hard game would be 0.8 and 1.2.  It wouldn't have to by symmetric.  Maybe the player wants 1.2 and AI at 1.6.  This would be quite hard but play much faster.   Whereas 0.8 and 0.6 would be in the player's favor but play slower.  (Totally making up these numbers by the way--they could be way off and 1.05 and 0.95 may make more sense).

Original MoO does exactly this, among other things, but the numbers are pretty astonishing. The player always gets the same (1.0) production, but the AI gets 1.25 times that production on average difficulty. There is some documentation saying that Hard AIs get x1.5 and Impossible AIs get x2, but I believe some code-diving discovered it's actually the Hard AI that gets x2 production ... while Impossible AIs getx4!
Reply

Thanks for to info! 4x is crazy. Simply the returns from pollution calculations early game would seem to get out of hand. Imagine the eco slider requiring 1/4 the regular levels with all the extra pumped back into faster factories. It is much faster than 4x growth after a few turns.

This is slightly less transparent but I think we could be more generous with the 1/6 from scrapping ai ships. This lets the ai continually refresh ships. The designs wouldn't be perfect but they would be up to date. Also, I think it is easier to program intelligent use of reserve funds (which would be regularly topped off from scrapping ships). I recall reading a thread about ai ship design. That stuff gets complicated quickly.
Reply

Yeah; note those numbers I quoted are from (ollllld) memory, so I might be mistaken: Impossible might be "only" 3x (among other bonuses) - I'd have to look it up to be sure. That said, the AI doesn't get quite the unbeatable economic bonuses you describe, because it spends a lot of resources on fleets and missile bases (even very early on) and the tax slider, plus counter-espionage when it meets somebody. This is actually kind of necessary to have an AI that's fun to play against: A well-executed early war can be effective even as MoO stands (as Thrawn has demonstrated) but if an AI regularly runs an economic farmer's gambit, early war against first contact would likely become the One Right Move for the player. So the AI ends up building and maintaining monster fleets to keep the player honest, which eat up a lot of its advantages. It also makes scrambling to defend against those monster fleets a really fun challenge when the AI goes to war, of course!

Hopefully Remnants of the Precursors will have a good enough AI that it will be fun to compete against without "cheating" quite so severely as the high-level AIs do in the original Orion. Artificial intelligence has come a long way in the past 20+ years!

Scrapping ships: I believe you actually get 25% of the value, rounded down, not just 1/6th. Either way, I think a bonus to scrap value would be a clever way to boost the AI, but maybe not transparent enough for a game like Remnants. Having gone through the process of writing a couple of ridiculously complicated algorithms for that thread on ship design (which RayF wisely simplified) I have to agree that it's better for the AI to design acceptable ships that are kept up to date than to try giving the AI a "perfect" ship design routine. Even my massively complicated algorithms certainly had holes, for instance, and even the simplified version RayF described, if built with state-of-the-art equipment, should be better than a perfectly-designed-at-the-time ship that's a generation out of date.
Reply

Maybe the pros here have already realized this and I'm late to the party but ship design will be the hardest thing to code up for the ai. It is such a critical link between macro and micro. Strategy and tactics.

Over time I'm confident Ray and co can make a tactical ai as well as a macro ai that is even flavored by the leader preferences (diplomatic ecologist) as well as racial bonuses. The latter ai should take advantage of Econ multipliers to shore up weaknesses.

The real crux will be to see if he is capable of linking these 2 ai's through ship design. Again, there shouldn't be "beginner" and "hard" design. They should all be strong/diverse as possible and then let Econ influence the production capacity.

---------------------
Race relations is another possible area for difficulty to vary. Harder to be friends on impossible. However does this mean that computer races are also more likely to fight each other? If I recall correctly the computer ai treats all races the same when it comes to diplomacy, regardless of whether it is another ai or not.
Reply



Forum Jump: