It is currently 18 Apr 2024, 15:02
   
Text Size

Questions

Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins

Questions

Postby mtgrares » 16 Dec 2010, 21:44

I just have a few random questions.

1. Did you code the min-max algorithm yourself or did you use someone else's code? (I'm just asking since I've tried coding min-max myself and got stuck.)

2. I'm not 100% familiar with the new blocking rules introduce in M10 since I play only computer Magic but I think the AI could use Ursapine 's ability during combat instead of during his Main 1.

3. About Ursapine, one time when I and the AI had 10 creatures each the AI thought for about 4 minutes analyzing how to use Ursapine's activated ability. Granted my PC is pretty old so a faster computer would not have taken so long. All of the other AI evaluations have taken remarkably little computing time, even on my computer.

4. I attacked with 2/2, 2/4, 3/5 and the computer blocked my 2/2 with his 3/5. It seems like the computer should have blocked my 3/5, since both of our 3/5's had flying. Here is a screenshot.

Thanks again for your program. I've gotten used to how it skip turns and having an undo button is great if I accidentally skip a phase. I'm not sure that I win 50% of the time. I think I only win 30% of the time but I'm having a good time improving my Magic skills since I only use Forge and Magarena.

Magarena goes a good job of surprising me during combat because I've been playing Forge for years and its AI doesn't do any combat tricks.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: Questions

Postby ubeefx » 16 Dec 2010, 23:11

Here are my answers :

1. I am proud to say I coded and designed the AI and the entire game myself. :)
It uses a lot of my ideas to make the Min-Max fast. I documented it on Wiki so that other people can read how it works and use it in their own programs if they like.
But I also needed to look into it again because it is already many months ago I wrote most of the AI.

2. Ursapine uses the "pump" timing. This ability can thus be played in first main of turn player, in declare blockers or as response to something on stack. In some cases the AI will not see any benefit to playing it in declare blockers and will play it in first main.

3. Yes, the Ursapine ability can be really stressful for the AI. It can be used multiple times on all of your creatures. A lot of tricks were needed to make these situations fast enough, but occasionally it can still be slow like you noticed.

4. The 3/5 deals only one more damage than the 2/2. But the AI can destroy the 2/2 by blocking it. It prefers that over the 1 extra life it loses. BTW Cool to see a screenshot of Magarena in action.

The undo is such a wonderful byproduct of an AI feature. :D It use it a lot too. Sometimes I just use it to see how the computer will block my creatures so I do not have to figure it out. Your win percentage will depend on the deck strength, luck of the shuffling, the number of games and playing well. So a lot of factors.
User avatar
ubeefx
DEVELOPER
 
Posts: 748
Joined: 23 Nov 2010, 19:16
Has thanked: 34 times
Been thanked: 249 times

Re: Questions

Postby mtgrares » 17 Dec 2010, 17:20

My win percentage is a little low because I'm just an "average" Magic player. I probably should reduce the AI and play on an easier setting but I enjoy winning because I know I beat the computer on its hardest setting.

I'm glad that you liked the screenshot. Magarena looks very nice. I didn't know you could use Swing and custom components to make something that looks that good. I can use Swing very well but I've never written any custom components for it. I don't know anything about graphics and when you mention "There is basic skinning with textures" I'm not sure what you are talking about.

I did find one AI oddity but I didn't take a screenshot. The AI killed my 8/8 by combo-ing two spells (which was cool). The slightly odd thing was that the AI attached Galvanic Arc to my 8/8 before Arc's triggered ability killed my creature. It wasn't a bad thing, just something unusual that a human player would never do.

The 3/5 deals only one more damage than the 2/2. But the AI can destroy the 2/2 by blocking it. It prefers that over the 1 extra life it loses.

That is very sophisticated. Talk about "ghost in the machine", ha. :D
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: Questions

Postby ubeefx » 17 Dec 2010, 17:37

Swing is indeed very powerful. Because it uses no native widgets and draws everything itself, it looks and behaves the same on all platforms and is very flexible, for instance by writing look and feels you can customize everything.

About the skinning, it means I use two seamless texture images (one for background and one for components).

About the AI oddity with Galvanic Arc, I noticed this also. Galvanic Arc can enchant all creatures for the AI, because it also works as removal. And in some cases the AI sees no use for the first strike ability and just puts it on one of the creatures. But this is something that probably can be tweaked with the score.
User avatar
ubeefx
DEVELOPER
 
Posts: 748
Joined: 23 Nov 2010, 19:16
Has thanked: 34 times
Been thanked: 249 times

Re: Questions

Postby mtgrares » 17 Dec 2010, 17:59

I like the wood theme, which is something that I would have never been able to create myself.

And awhile ago I asked myself, "What are Magic's most powerful cards?" and that lead to me cube drafting (where you construct your own set) and to http://www.cubedrafting.com/ which updates and talks about its cube.

Galvanic Arc was just a curiosity, tweaking the evaluation function seems hard to impossible because you don't ever know how it will effect the AI. Did the AI play itself and tweak its own evaluation function?
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: Questions

Postby ubeefx » 18 Dec 2010, 12:18

The wood theme was the first, then the opal theme and now I also like the granite theme personally.

Cool thing is while developing Magarena I did not know about the Cube drafting format.
Now I do know about it and it is certainly related to what Magarena is trying to accomplish. :)

Problem with tweaking scores is that they could make some situations better and others worse.
And because I have only limited time for testing, I prefer not to change too much on the AI right now.
User avatar
ubeefx
DEVELOPER
 
Posts: 748
Joined: 23 Nov 2010, 19:16
Has thanked: 34 times
Been thanked: 249 times


Return to Magarena

Who is online

Users browsing this forum: No registered users and 30 guests


Who is online

In total there are 30 users online :: 0 registered, 0 hidden and 30 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: No registered users and 30 guests

Login Form