Steve Jackson Games - Site Navigation
Home General Info Follow Us Search Illuminator Store Forums What's New Other Games Ogre GURPS Munchkin Our Games: Home

Go Back   Steve Jackson Games Forums > Board and Card Games > Ogre and G.E.V. > Ogre Video Game

Reply
 
Thread Tools Display Modes
Old 10-16-2017, 01:07 AM   #11
GuyMacon
 
GuyMacon's Avatar
 
Join Date: Oct 2017
Default How to get a better AI

Quote:
Originally Posted by Steve Jackson View Post
And eventually we may get to an AI with difficulty levels, but that's not the immediate goal. Chess programs have actual degrees of difficulty built into AI opponents, but as far as I know most digital games just apply a handicap in terms of resource gathering, unit numbers, hit points, whatever. Can anyone with wide knowledge of the field comment?
This is a followup to my previous post. If you haven't read that one, do so now.

OK, let's say you have a great evaluation function. The AI is pretty good at looking at all of its available positrons and picking the best one. Now add a layer (known as a "ply" in chess programming). Look at every possible response, evaluate them all, and choose your move so as to avoid the really good counter moves. Then look at all of your possible responses to each of those countermoves. This is known an "Min-max" and there are a lot of webpages on it.

For most games a two-ply lookahead happens so fast that you don't notice the delay. But as you add plies the computing time explodes, and in chess you have to prune some branches of the tree in order to get a longer lookahead. For example a move that loses a queen usually doesn't need to be explored as deeply as a move that gains a pawn.

Then there is the classic trade-off: do I have a simpler evaluation function so as to get more lookahead in a reasonable amount of time? That's what IBM's Deep Blue did. Or do I sacrifice lookahead in order to spend more time evaluating each position?

These are all pretty advanced chess programming topics, but in the case of Ogre I think a simple brute-force lookahead with limited plies and no pruning, using the best evaluation function you can write, would improve the AI noticeably. The first few plies make a big difference in how smart the AI seems to be.

As for levels of AI difficulty, don't fall into the trap of simply reducing the lookahead. That makes the AI easier to beat, but it often feels like you are playing an idiot machine, Instead, spend some time figuring out how to make it play well sometimes while sometimes making the kind of blunder a human might make. Something like in chess not noticing that a knight is under attack -- a mistake even the dumbest programs never make.
GuyMacon is offline   Reply With Quote
Old 10-16-2017, 07:03 AM   #12
dwalend
 
Join Date: Oct 2005
Default Re: Moving Stacks?

Quote:
Originally Posted by Steve Jackson View Post
And eventually we may get to an AI with difficulty levels, but that's not the immediate goal. Chess programs have actual degrees of difficulty built into AI opponents, but as far as I know most digital games just apply a handicap in terms of resource gathering, unit numbers, hit points, whatever. Can anyone with wide knowledge of the field comment?
Ogre is different enough from chess, and far less researched, that I don't think the chess approaches will work. Minimax look-ahead works really well for chess, and there's a huge catalog of opening moves available.

For example, one theme in Ogre is the difficulty of changing your goals after you've committed to them. "Pick mostly GEVs, get rid of the main battery, then go after treads to preserve your GEVs." vs "Pick mostly HVYs, and take the ogre apart to preserve your HVYs." Every decision you make commits you further.

I think a playbook approach fits Ogre particularly well - to some degree imitating that catalog of opening moves. Look-ahead minimax makes some sense just before and during contact, to pick just which option to take. However, look-ahead should be confined to following the overall strategy.

One way to add levels in a playbook is to include better strategies and tactics at higher levels. The introductory AI sets up its GEVs too far forward. The diabolical AI knows the inverted V of HVYs and the 4 howitzer defense.

A more dynamic option is to add "rookie mistakes" to the playbook to rebalance the game part-way through. The AI could take a game from a near-certain win to 4:3 odds with a mistake that gives up a tank. (At some point you switch to a mercy kill to wrap up the gaim. That's in the entertainment spectrum of AI. DARPA didn't ask for that.) One advantage of having the video game is that the AI can harvest results from many players and get a good idea of the odds from each move.

The AI included in the game now - to my mind at least - seems to make a lot of rookie mistakes.
dwalend is offline   Reply With Quote
Old 10-16-2017, 01:48 PM   #13
rchandra
 
Join Date: Oct 2017
Default Re: Moving Stacks?

Quote:
Originally Posted by dwalend View Post
I think a playbook approach fits Ogre particularly well - to some degree imitating that catalog of opening moves. Look-ahead minimax makes some sense just before and during contact, to pick just which option to take. However, look-ahead should be confined to following the overall strategy.
As long as your positional evaluation function is good enough, you won't have to worry about it accidentally hybridizing with "pick GEVs, take the ogre apart" - it'll figure out that the tread approach is better once its in that GEV-heavy position. But I expect that either the opening book approach or genetic algorithms would be good for picking and deploying initial forces.
rchandra is offline   Reply With Quote
Old 10-16-2017, 02:08 PM   #14
GranitePenguin
Ogre Line Editor
 
GranitePenguin's Avatar
 
Join Date: Sep 2006
Location: Plainfield, IL
Default Re: Moving Stacks?

Quote:
Originally Posted by dwalend View Post
The AI included in the game now - to my mind at least - seems to make a lot of rookie mistakes.
I agree with this statement. There was a lot of "missing the forest for the trees" happening that I saw on several occasions. In the campaign scenario with the train, it put waaaaaay too much importance on shooting AUs when it should have been shooting the train or the rails. It was almost like self-preservation was more important than winning the mission.

A not-quite-AI issue, too... The UI stuck me in a swamp when there was no reason for it; it picked a path through the swamp over a path through clear terrain. I'm not sure what drives the logic for selecting a driving path, but it failed miserably on that one.
__________________
GranitePenguin
Ogre Line Editor
GranitePenguin is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Fnords are Off
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 04:15 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.