It is currently 16 Apr 2024, 14:14
   
Text Size

Good Games

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

Re: Good Games

Postby MageKing17 » 05 Jan 2011, 00:43

The AI technique used by Magarena requires a small card pool, because there are certain abilities or mechanics that the AI just cannot handle in a reasonable timeframe. The AI technique used by Forge seems "stupid" only because it has to accommodate a much wider variety of possible mechanics. You can either have challenging AI or a large cardpool; both is eating your cake and having it too.
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

Re: Good Games

Postby ubeefx » 05 Jan 2011, 07:58

I fully agree with what Mageking17 says, adding too much features would make AI slower and slower.
Nobody would like to wait minutes for each choice the computer has to make.
So Forge has to use another approach to support so many cards.
User avatar
ubeefx
DEVELOPER
 
Posts: 748
Joined: 23 Nov 2010, 19:16
Has thanked: 34 times
Been thanked: 249 times

Re: Good Games

Postby puxl » 06 Jan 2011, 01:17

Well, some cards would cause pretty much headache to the AI, but there are many nice cards that can be added with minimal effect on AI speed. Generally just avoid any "infinite" combos, too many choices ("tap or untap up to five target permanents") and some complex stuff like planewalkers or some cards with 10 or more lines of rule text.

I started my local fork (not yet published anywhere, still need to do some testing), and I added about 550 creatures. I guess I'll have to add some code so card definitions could be more scripted (for example regeneration could be another field in the card in form "regeneration={mana cost}" instead of having to add some code in PermanentActivationDefinitions.java for every card with regeneration - which then would be necessary only for regenerations with some obscure activation costs, like sacrificing something)

And the same for pumping ....

This would make adding more cards easier.

Also some not-yet-implemented features like Flanking, Shadow, Rampage and Bushido should not bring too much trouble to the AI, since they do not bring more choices (though the quick combat estimator perhaps would need some modifications) - so they are next on the list ....

I think next week I'll put up the sources (both complete source tarball + patch against SVN) somewhere and then we'll see.

I'll add also some feature to limit choice of the cards that can be used by using some list - one of the list would be the original cube of Magarena, but people then would be able to create their own cubes from the implemented cards - or simply use all cards and constructed decks.

Edit:
Also, I encountered two fields in the file with card properties I did not understand:

What does mean "static" field? It seems it can be set to player/opponent/all/none, but that is its meaning?

And the second question is about "value" field. It seems to have values between 1 and 5 .... I guess it is some card value for the AI, how this property should be set for cards I add so it is consistent with the rest of existing cards?
puxl
 
Posts: 11
Joined: 23 Apr 2010, 18:20
Has thanked: 0 time
Been thanked: 0 time

Re: Good Games

Postby ubeefx » 06 Jan 2011, 07:56

I also plan for next release to improve the card definition file to allow for instance abilities like regeneration, pump, etc.

You are right that many cards can be supported by the Magarena engine. I never tried to add all possible ones.
Also, lately I have added stuff like Devour, intimidate, milling, ... that allows more cards to be added.
So if you stay within the limits of this engine a lot can be done.

My idea now is to move as much as possible to the card definition file for next releases. This will allow users to add cards.

About the two fields :
- static : this permanent has an effect on other permanents (like +1/+1 to creatures you control, -1/-1 creatures opponent controls, ...)
- value : 1-5, rough value of a card (like people tend to score cards for picking in draft or sealed with 1 to 5 stars)

BTW, please make a new topic to post about further developments of your fork, this does not really belong in "Good Games".

ubeefx
User avatar
ubeefx
DEVELOPER
 
Posts: 748
Joined: 23 Nov 2010, 19:16
Has thanked: 34 times
Been thanked: 249 times

Previous

Return to Magarena

Who is online

Users browsing this forum: No registered users and 20 guests


Who is online

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

Login Form