alpha-beta combat
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
alpha-beta combat
by mtgrares » 29 Jun 2009, 21:05
Currently I'm trying to apply alpha-beta to plain, creature combat. On my blog I've talked alot about alpha-beta, so now I'm actually trying to code it. Hopefully I should be able to update the current version of MTG Forge with the improved attacking and blocking code, if I can get the code to work at all, which is a big IF. Wikipedia has some good stuff about min-max and alpha-beta.
Basically you are trying to maximize your score and minimize your opponenets score, so that is why it is called min-max. Alpha-beta is an optimized version of min-max. The tricky part with min-max or alpha-beta is that you have to create a very good "scoring function" that looks at the game and says, "Oh this stinks, I'll give it a 10" and "This is good, so I'll give it a 100." The scoring function has to look at which creatures are in play and determine which player is winning or losing AND generate a number that represents how much you are winning or losing.
p.s.
Sometimes I think I write too much, lol.
Basically you are trying to maximize your score and minimize your opponenets score, so that is why it is called min-max. Alpha-beta is an optimized version of min-max. The tricky part with min-max or alpha-beta is that you have to create a very good "scoring function" that looks at the game and says, "Oh this stinks, I'll give it a 10" and "This is good, so I'll give it a 100." The scoring function has to look at which creatures are in play and determine which player is winning or losing AND generate a number that represents how much you are winning or losing.
p.s.
Sometimes I think I write too much, lol.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: alpha-beta combat
by Mr.Chaos » 30 Jun 2009, 05:52
Shows you the power of the human mind, doesn't it?
We glance at the playing field, get an instant overview of the cards in play and have a decent idea who has the advantage. To get the AI to do the same makes your brain hurt.
And this in reply to your p.s.
We glance at the playing field, get an instant overview of the cards in play and have a decent idea who has the advantage. To get the AI to do the same makes your brain hurt.
And this in reply to your p.s.
= coder at work, according to a coder.It does explain some of the bugs.
- Mr.Chaos
- Tester
- Posts: 625
- Joined: 06 Sep 2008, 08:15
- Has thanked: 0 time
- Been thanked: 0 time
Re: alpha-beta combat
by mtgrares » 30 Jun 2009, 16:20
Funny comic. Dilbert and Zits also make me laugh.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 168 guests