Quest Mode
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Quest Mode
by mtgrares » 08 Apr 2009, 18:37
Hopefully in the 04/04 version it will work past level 11, I gave DennisBergkamp some code. Unfortunately the 04/04 seems to have a bug with multiple blockers, you can't seem to assign damage.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: Quest Mode
by DennisBergkamp » 08 Apr 2009, 18:51
Which bug is this?
Yes, I added in the code you gave me
Yes, I added in the code you gave me
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Multiple Blockers
by mtgrares » 08 Apr 2009, 18:55
I posted the bug on the topic, MTGForge 04/04 (unofficial BETA) version. When you are attacking and the computer blockers with more than 1 blocker, you cannot assign combat damage to them and nothing happens.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: Quest Mode
by DennisBergkamp » 08 Apr 2009, 19:01
Hmm, I just tested this attacking with two Transluminant, one of them got blocked by two Zodiac Rat, and I could assign combat damage to them just fine (both rats and my Transluminant died after). Do you remember which cards this happened with?
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Quest Mode
by mtgrares » 08 Apr 2009, 19:05
Hm..no, it happened twice last night and I didn't pay attention. Next time it happens I'll make a note of it. Sorry for yelling, "Fire, fire!" Keep up the good work, Forge
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: Quest Mode
by DennisBergkamp » 08 Apr 2009, 19:09
Alright, sounds good
I'd like to fix this... it doesn't surprise me some new bugs might still exist in the combat code (since I changed so many things in it recently).
Hmm, I just noticed in the bug report you posted this:
I'd like to fix this... it doesn't surprise me some new bugs might still exist in the combat code (since I changed so many things in it recently).
Hmm, I just noticed in the bug report you posted this:
But I'm pretty sure this should be fixed already.If you double block a creature with first strike nothing happens. For example if you block a 1/1 creature with first strike by two 1/1s, no damage is assigned and no creature goes to the graveyard.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Quest Mode
by DennisBergkamp » 08 Apr 2009, 19:14
On a different note, I attack with my Knight of Meadowgrain only to be double blocked by 2 Zodiac Rat. Not a smart block
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Quest Mode
by mtgrares » 08 Apr 2009, 19:16
You would think that I would write down the creatures that were attacking and blocking, but alas, I didn't. Even I don't make a good bug tester sometimes, ha.
The more combat stuff you add the stupidier the computer gets, the AI uses something like CombatUtil.willCreatureDie(Card a, Card b) but it doesn't account for first strike and double strike because the code was written before first/double strike.
(The code would be in ComputerBlock2 or something like that.)
The more combat stuff you add the stupidier the computer gets, the AI uses something like CombatUtil.willCreatureDie(Card a, Card b) but it doesn't account for first strike and double strike because the code was written before first/double strike.
(The code would be in ComputerBlock2 or something like that.)
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: Quest Mode
by DennisBergkamp » 08 Apr 2009, 19:26
I've actually added code for First Strike and Double Strike in CombatUtil's canDestroyAttacker(Card attacker, card defender)
It seems to be a bit smarter now when deciding when to block First Strike / Double Strike creatures. HOWEVER, the multiple creature block in Computer_Block2 doesn't use canDestroyAttacker(), I think it just uses SumAttack(blockers) to see if it can destroy an attacking creature if it blocks with multiple creatures.
But you're right, as more combat stuff gets added, you need more checks. For the next beta version I will release, I will include "Flanking" and "Protection from {color}" as keywords. This required a lot more checks in canDestroyAttacker, and since I've also already added Sylvan Basilisk a few versions ago, I've also created a canDestroyBlocker(Card defender, Card attacker) (maybe should rename defender to blocker?) because now the variables are different for attackers + blockers (Sylvan Basilisk as an attacker will kill a blocker no matter what, but it's different story when it's assigned as a blocker).
It seems to be a bit smarter now when deciding when to block First Strike / Double Strike creatures. HOWEVER, the multiple creature block in Computer_Block2 doesn't use canDestroyAttacker(), I think it just uses SumAttack(blockers) to see if it can destroy an attacking creature if it blocks with multiple creatures.
But you're right, as more combat stuff gets added, you need more checks. For the next beta version I will release, I will include "Flanking" and "Protection from {color}" as keywords. This required a lot more checks in canDestroyAttacker, and since I've also already added Sylvan Basilisk a few versions ago, I've also created a canDestroyBlocker(Card defender, Card attacker) (maybe should rename defender to blocker?) because now the variables are different for attackers + blockers (Sylvan Basilisk as an attacker will kill a blocker no matter what, but it's different story when it's assigned as a blocker).
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Quest Mode
by GandoTheBard » 08 Apr 2009, 19:29
Another bit that would improve the AI significantly would be acheck for a good ability. IE you dont attack with Prodigal Sorceror (and the AI doesnt normally) but I have seen the AI attack with other creatures you normally wouldnt. A section that checks if the AI is gaining or losing card advantage would be good too. Not that card advantage has as much meaning as it used to but it is important somewhat. For example if you have 3 1/1s and your opponent is attacking with a 3/3 pinger (like thrashing wumpas (one of my favorite black cards btw)) the 3 1/1s should block it. On the other hand losing 3 1/1s could hurt quite abit if the 3/3 is just some generic beater and the weenies are say Soul Wardens or other important critters.mtgrares wrote:You would think that I would write down the creatures that were attacking and blocking, but alas, I didn't. Even I don't make a good bug tester sometimes, ha.
The more combat stuff you add the stupidier the computer gets, the AI uses something like CombatUtil.willCreatureDie(Card a, Card b) but it doesn't account for first strike and double strike because the code was written before first/double strike.
(The code would be in ComputerBlock2 or something like that.)
visit my personal homepage here: http://outofthebrokensky.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
-
GandoTheBard - Tester
- Posts: 1043
- Joined: 06 Sep 2008, 18:43
- Has thanked: 0 time
- Been thanked: 0 time
Re: Quest Mode
by mtgrares » 08 Apr 2009, 19:33
It sounds like you've got it all under control, good It all goes back to "what is generally good attacking and blocking?" This probably won't happen but it is in my mind, I keep thinking about working on min-max for just combat, because combat is relatively simple compared with the whole game of Magic. Then the min-max would find a good solution to which creatures should attack or block without having to "code intelligence" into the AI, because trying to code intelligence is very hard and tedious.
Later the code could check for activated abilities like Prodigal Sorceror or give cards like Prodigal Sorceror higher priority over regular 1/1 creature.
Later the code could check for activated abilities like Prodigal Sorceror or give cards like Prodigal Sorceror higher priority over regular 1/1 creature.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: Quest Mode
by Chris H. » 08 Apr 2009, 23:15
Will there be a version of the Protection from {color} keyword that will give us Protection from artifacts?For the next beta version I will release, I will include "Flanking" and "Protection from {color}" as keywords.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Quest Mode
by DennisBergkamp » 09 Apr 2009, 00:33
Yes, after (when the whole protection from {color} business is working without bugs) I'll do Protection from artifacts and Protection from creatures.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Quest Mode
by Rob Cashwalker » 09 Apr 2009, 14:05
Don't forget "Protection from everything".....
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
29 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: Google [Bot] and 168 guests