How Should Beyond Earth Handle AI Difficulty Scaling?

The problem is you can't just turn a dial that makes the AI smarter.

Of course you can. You handicap the AI at lower difficulty levels, instead of cheating at higher difficulty levels.

I see what you mean, but I think something going by the name of "smarter dial" doesn't really exist. That would just be too easy :p We certainly have dials to make an AI dumber though.

If anyone's wondering, scaling an AI's ability down is easy, so there's no worry of needing to add negative handicaps that might mess up the game. It's just that getting the AI really good in the first place is hard. This is why I would argue a really strong AI is a great thing, since using that as a starting point lets you get the whole range of difficulty levels and the advantage is that you don't have to resort to handicap bonuses nearly as much. You can adjust the AI to what's fun more through their decisions.

Bear in mind in this case I'm mostly asking for strength in the tactical part of the AI(where it suffers most), not play-to-win high-level strategies. As some have pointed out, how the AI acts in a "historical" vs "game" relationship is important.
 
As some have pointed out, how the AI acts in a "historical" vs "game" relationship is important.

In an ideally designed civ game, those two would be the same. Or at least, share a large overlap. Unfortunately, the current end game for civ does not steer player behaviour to something realistic. Consequently, a rational AI, will behave in an unfun/unrealistic manner, and the game needs to resort to having the AI make irrational decision (from the perspective of the game rules).

One thing that would help with this, is if surviving were more important than winning.
 
The AI should manage to fight a war like a not-moron on the occasions it does go to war for whatever reason, at least.
I agree that on that spectrum from complete moron to serendipitous genius the battle AI should move a bit to the right - not all the way, mind you, for the reasons stated above.

Ask yourself this: If in a MP situation (not just in Civ but in any competitive game or sport) you happen upon a bunch of opponents who are massively better than you, how motivated will you be to play against these people again and again? At first you might think "I could learn something from this" but before long just being cannon fodder will lose its fascination. Even if they give you a head start it will not feel rewarding. That is even more true in a solo game against the AI.
Only if you have the intelligence of the AI at a level that challenges but is beatable will players enjoy the game.

I'm aware that many players (who seem to be disproportionally well represented on these boards) are not challenged enough by the AI but are unwilling to give it a head start or accept that the AI must necessarily play by slightly different rules (like being allowed to ask a player to move his troops from the border in exchange for not being able to meaningfully spy on him).

BTW the distinction you make between a roleplaying AI and one that tries to win could so easily be resolved by changing the VCs and especially allowing joint victories under special circumstances.
 
I agree that on that spectrum from complete moron to serendipitous genius the battle AI should move a bit to the right - not all the way, mind you, for the reasons stated above.
Well, it is safe to say that we are at no risk of getting a genius battle AI any time soon.;)

Moreover, if we did get one, it wouldn't be too hard to include a dumber dial for lower difficulty levels.
 
Hey there again. Let's push back the fog of uncertainty a little bit. I may have an answer for the curious people here. Is a search-style tactical AI feasible for civ?

Yup. More or less.

That's how things look, anyway. I've put my dev skills towards the problem and learned a lot (worth, I tell myself :rolleyes:). So here's what's up:

- I haven't been crushed by combinatorics yet (yay)
- I'm actually getting plays that... make sense. It feels weird.
- Adding more pieces doesn't seem to have that big of an effect on practicality. There is a "bulge" in the game tree around the middle of your turn. I think more pieces mostly just add a bunch of useless moves to the bulge and you can cut right through it. At least I've been able to with pretty sloppy pruning at 8+ pieces per side.

I don't have it set up where I can actually play against it yet, but it looks promising. There is still stuff that needs doing, primarily a heavier, "proper" evaluation that's more fine-grained. Some important stuff really depends on that. I don't know what kind of playing strength to expect, but it almost certainly will never throw away units or hp pointlessly. I wonder if I should get it to a state where other people can play against it?

Lastly, I have some comments on implementation if anyone's into that :)

- Transposition tables are amazing. You NEED to detect the same position and not search it again. Otherwise it slows down your search by a factor of crazy. The more depth, the more crazy. Like, at depth 4 it's 20 times slower. Past that I don't even know because I don't hate my CPU.
- Incremental board state. ie, make moves and undo moves. Use a Zobrist hash and it's pure synergy with a transposition table. Increment position, increment hash, directly look up TT entry that is the node in the game tree. You can do like a million of these per second.
- All in all, getting around 100k nodes per second for civ seems reasonable. Way more than I initially guessed. It's not chess speed where it's more like 1.5M per core, but chess has a much smaller board state, to where you can have 64-bit bitboards. Then you abuse SSE instructions and the pieces have lots of sliding moves, etc.
- Incremental board state for civ is really complicated. If you want to be efficient and avoid the most work possible there is a hell of challenges awaiting you :p Because remember you need to play backwards as well as forwards.
 
How about a more customizable difficulty? Instead of fixed bonuses per difficulty levels, have a large number of tweakable sliders, such as:

AI bonus gold
AI bonus techs
AI free units
AI reduced maintenance
AI increased science
AI unit production bonus
AI building production bonus
AI wonder production bonus

Those would be like the right side of the scale for more difficult, and the left side would do the opposite giving the AI penalties instead to make the game easier.
 
Back
Top Bottom