It is currently 26 Apr 2024, 03:39
   
Text Size

Quest Mode

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Quest Mode

Postby 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

Postby DennisBergkamp » 08 Apr 2009, 18:51

Which bug is this?

Yes, I added in the code you gave me :)
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Multiple Blockers

Postby 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

Postby 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?
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Quest Mode

Postby 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

Postby 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:

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.
But I'm pretty sure this should be fixed already.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Quest Mode

Postby 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 [-X
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Quest Mode

Postby 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.)
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: Quest Mode

Postby 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).
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Quest Mode

Postby GandoTheBard » 08 Apr 2009, 19:29

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.)
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.
visit my personal homepage here: http://outofthebrokensky.com

Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
User avatar
GandoTheBard
Tester
 
Posts: 1043
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: Quest Mode

Postby 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.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: Quest Mode

Postby Chris H. » 08 Apr 2009, 23:15

For the next beta version I will release, I will include "Flanking" and "Protection from {color}" as keywords.
Will there be a version of the Protection from {color} keyword that will give us Protection from artifacts?
User avatar
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

Postby 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.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Quest Mode

Postby Rob Cashwalker » 09 Apr 2009, 14:05

Don't forget "Protection from everything".....
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Previous

Return to Forge

Who is online

Users browsing this forum: Google [Bot] and 168 guests


Who is online

In total there are 169 users online :: 1 registered, 0 hidden and 168 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: Google [Bot] and 168 guests

Login Form