Bluffing is not a major part of Magic but it is still exists. By “bluffing” I mean attacking as if you held a card like Giant Growth. You can even bluff with cards like Shock by attacking your opponent’s 4/4 with your lowly 2/2. Usually I would wait until the 4/4 attacks and then block it with your 2/2 and kill it with Shock but every game as different specific tactics and situations.
“When should you bluff?” I tend to never bluff when attacking because I never know if the AI will block or not. Obviously if I think that a bluff would win me the game, I will try it. Otherwise I might only bluff with small creatures if I had plenty of other creatures on the board.
The AI is interesting because it plays multiple matches and it could keep track of the number of times that a bluff failed or succeeded. The AI could bluff more or less as needed. In order for the AI to act like a human player the bluff should work 50 to 75 percent of the time (although this is just a rough guess). The AI could bluff all of the time but that would be very stupid. (The goal of the AI is to make it act like a human player and force you to make hard combat decisions.)
Right now the AI never bluffs on purpose. The AI may bluff accidentally because combat is very complicated (but very fun). I am just happy that the AI can play instants during combat, so players are surprised some of the time. For many years I attacked like a madman because I knew the AI never used instants during combat. The AI can also use Counterspell which is always stuns me and makes me momentarily panic.
Feedback Question:
When (and if) should you bluff when playing Magic?
--mtgrares
p.s.
Some games like poker are almost exclusively based on bluffing, which explains why I am so bad at it.
Because of my programming background I never have to ask myself, “Will computers ever evolve, like in the Terminator movies?” because computers are really, really stupid. A computer is just a very fast calculator.
Monday, March 26, 2012
Saturday, March 17, 2012
Nothing New
I usually have a fabulous article to post every Monday but sometimes the well runs dry, aka. I have no idea in the whole universe about what to write. Usually ideas just randomly float into my head, which I think are gold, but other people may have (very) different opinions.
Read some Dork Tower and have a great week.
Read some Dork Tower and have a great week.
Monday, March 12, 2012
Cooperation and Why Forge Doesn’t Have Flame Wars
Forge is one big collaboration with people from different countries and languages. All of these people are united in their love for Magic: The Gathering. I am guessing that Forge has had at least 100 people submit Java code to the project and at least 50 have made substantial contributions.
I presume most people add a card or two that they really wanted. Forge is a random collection of cards, so you can never be sure which cards Forge has or doesn’t have. Most people also have a favorite card, or three, or a card that they enjoy using. Even if the card is usually crappy but has the chance to win the game once in a while. Crappy cards aren’t crappy 100% of the time, so it is ok for Forge to incorporate them.
Forge also does not have forum flame wars. Everybody acts like an adult (which is rare of the internet) and avoids the usual, “I’m right and you’re wrong” arguments that are never ending. This subject reminds me of an old joke about two guys who both moved. One guy says, “My new neighbors are nice but my old neighbors were nice also.” The other guy says, “I hate my new neighbors because they are just like my old neighbors.” Basically if you are nice, people will respond nicely and vice versa if you are angry.
All open source software is a testament to cooperation and the joy of working with your fellow man. Other types of media such as books and movies do not lend themselves to collaboration as well as software (for whatever reason). And many types of open source projects are not videogames. Maybe amateur videogames tend to be not very good or maybe open source videogames need more of a singular vision to be successful, who knows?
I am still surprised that people want to work on Forge because it was started by an amateur programmer using an old PC. Truthfully I started Forge because it was cheaper for me to code new cards versus buying them and I still get a thrill when I use rares like Darksteel Colossus, Elvish Piper, and Wrath of God because I never owned them in real life.
I am also happy that Forge’s simple AI does not detract from the fun factor. Making that early decision was a tough one.
--mtgrares
I presume most people add a card or two that they really wanted. Forge is a random collection of cards, so you can never be sure which cards Forge has or doesn’t have. Most people also have a favorite card, or three, or a card that they enjoy using. Even if the card is usually crappy but has the chance to win the game once in a while. Crappy cards aren’t crappy 100% of the time, so it is ok for Forge to incorporate them.
Forge also does not have forum flame wars. Everybody acts like an adult (which is rare of the internet) and avoids the usual, “I’m right and you’re wrong” arguments that are never ending. This subject reminds me of an old joke about two guys who both moved. One guy says, “My new neighbors are nice but my old neighbors were nice also.” The other guy says, “I hate my new neighbors because they are just like my old neighbors.” Basically if you are nice, people will respond nicely and vice versa if you are angry.
All open source software is a testament to cooperation and the joy of working with your fellow man. Other types of media such as books and movies do not lend themselves to collaboration as well as software (for whatever reason). And many types of open source projects are not videogames. Maybe amateur videogames tend to be not very good or maybe open source videogames need more of a singular vision to be successful, who knows?
I am still surprised that people want to work on Forge because it was started by an amateur programmer using an old PC. Truthfully I started Forge because it was cheaper for me to code new cards versus buying them and I still get a thrill when I use rares like Darksteel Colossus, Elvish Piper, and Wrath of God because I never owned them in real life.
I am also happy that Forge’s simple AI does not detract from the fun factor. Making that early decision was a tough one.
--mtgrares
Monday, March 5, 2012
New Version – Dark Ascension and 10,000+ cards
Forge is awesome. It has 154 Dark Ascension cards and a total of 10,382 cards, which is crazy. The new user interface looks great and when you start Forge, it has a nice, modern menu (which is shown below).
And here is a screenshot of the actual game. (Click to see a larger image.)
To get to the deck editor, choose Utilities from the left-hand menu and then you will see the Deck Editor. Most people will also want to use the Import Pictures (also found in Utilities) which imports cards pictures from a previous version of Forge. You can use the Import Pictures feature if you don’t want to move the files yourself.
I do not have much to add, so here is what Chris. H. posted:
(Begin Quote)
We have reached a new milestone. All Modern legal sets are at least 80% complete and all Extended legal sets are at least 90% complete.
A number of bugs were found and fixed. The mana pool bug which caused crash reports was fixed. We also have a performance fix relating to static abilities. These reported bugs were also fixed: Avatar index bug, Quest opponent refresh, Avatar switch bug and Win streak (stats) not refreshing.
The UI has a few new features including the option to pick an avatars from a collection of pictures. This can be accessed from the Settings -> Avatars tab.
The organizational structure of the /res/decks/ folder has been improved and we now have these four subdirectories:
/decks/constructed/
/decks/cube/
/decks/draft/
/decks/sealed/
You can now buy PreCon decks, Starter packs, Tournament packs and Fat packs from the quest mode card shop.
The Forge archive includes a readme.txt file and we ask that you spend a few minutes reading this file as it contains some information that may prove usefull. We do tend to update this file at times and you should quickly read this file and look for new information for each and every new release. Thank you.
We have changed the archival format used for the Forge distributions from ".zip" to ".tar.bz2". There are utilities for Windows, Mac OS and the various *nix's that can be used to decompress these ".tar.bz2" archives. We recommend that you decompress the Forge archive into a new and unused folder.
Some people use the Windows application 7zip. This utility can be found at http://www.7-zip.org/download.html. Mac users can double click on the archive and the application Archive Utility will launch and extract the archive. Mac users do not need to download a separate utility.
(End Quote)
Just another Pro-Tour wannabee,
mtgrares
------------------------------------------------------------------
Downloads
forge-1.2.4.tar.bz2 (33.2 MB, at cardforge.org) - for Windows, Linux
forge-1.2.4-osx.tar.bz2 (34.2 MB, at cardforge.org) - for Mac
Forge Forum – in case you need to ask questions or confess your addiction to Forge :)
Download Java - Forge requires Java 6
------------------------------------------------------------------
p.s.
Many people helped with this version. A special thank you goes out to them. (Attempted to list names alphabetically):
Agetian
ArsenalNut
Chris H
Corwin72
Dave
Doublestrike
Friar Sol
Hellfish
Jeff Wadsworth
Marc
Max mtg
NicoAndCo
Rob Cashwalker
Roujin
Slapshot5
Sloth
Squee1968
Timmermac
WompWomp
p.p.s.
Magic has some great artwork. Here are a few Dark Ascension cards that Forge has.
And here is a screenshot of the actual game. (Click to see a larger image.)
To get to the deck editor, choose Utilities from the left-hand menu and then you will see the Deck Editor. Most people will also want to use the Import Pictures (also found in Utilities) which imports cards pictures from a previous version of Forge. You can use the Import Pictures feature if you don’t want to move the files yourself.
I do not have much to add, so here is what Chris. H. posted:
(Begin Quote)
We have reached a new milestone. All Modern legal sets are at least 80% complete and all Extended legal sets are at least 90% complete.
A number of bugs were found and fixed. The mana pool bug which caused crash reports was fixed. We also have a performance fix relating to static abilities. These reported bugs were also fixed: Avatar index bug, Quest opponent refresh, Avatar switch bug and Win streak (stats) not refreshing.
The UI has a few new features including the option to pick an avatars from a collection of pictures. This can be accessed from the Settings -> Avatars tab.
The organizational structure of the /res/decks/ folder has been improved and we now have these four subdirectories:
/decks/constructed/
/decks/cube/
/decks/draft/
/decks/sealed/
You can now buy PreCon decks, Starter packs, Tournament packs and Fat packs from the quest mode card shop.
The Forge archive includes a readme.txt file and we ask that you spend a few minutes reading this file as it contains some information that may prove usefull. We do tend to update this file at times and you should quickly read this file and look for new information for each and every new release. Thank you.
We have changed the archival format used for the Forge distributions from ".zip" to ".tar.bz2". There are utilities for Windows, Mac OS and the various *nix's that can be used to decompress these ".tar.bz2" archives. We recommend that you decompress the Forge archive into a new and unused folder.
Some people use the Windows application 7zip. This utility can be found at http://www.7-zip.org/download.html. Mac users can double click on the archive and the application Archive Utility will launch and extract the archive. Mac users do not need to download a separate utility.
(End Quote)
Just another Pro-Tour wannabee,
mtgrares
------------------------------------------------------------------
Downloads
forge-1.2.4.tar.bz2 (33.2 MB, at cardforge.org) - for Windows, Linux
forge-1.2.4-osx.tar.bz2 (34.2 MB, at cardforge.org) - for Mac
Forge Forum – in case you need to ask questions or confess your addiction to Forge :)
Download Java - Forge requires Java 6
------------------------------------------------------------------
p.s.
Many people helped with this version. A special thank you goes out to them. (Attempted to list names alphabetically):
Agetian
ArsenalNut
Chris H
Corwin72
Dave
Doublestrike
Friar Sol
Hellfish
Jeff Wadsworth
Marc
Max mtg
NicoAndCo
Rob Cashwalker
Roujin
Slapshot5
Sloth
Squee1968
Timmermac
WompWomp
p.p.s.
Magic has some great artwork. Here are a few Dark Ascension cards that Forge has.
Monday, February 27, 2012
Dark Ascension is Coming
I thought about posting a new version of Forge today but the most recently released version on the forums does not download the new Dark Ascension card pictures, and I know that everybody loves to use and abuse new cards. Hopefully a new version of Forge will be posted to the forums on March 2nd but that is only a tentative date and it may change. The next version will have at least 149 cards from Dark Ascension.
The Forge team is very happy to announce that Forge now supports more than 10,000 cards, which is a major milestone. Here is the announcement that they posted on the forum. (This relates to the 02-03 version which does not download the Dark Ascension card pictures.)
{begin quote}
The Forge team is very proud to announce that more than 10,000 cards are now available for play! This is an impressive amount, particularly considering that as of October 2011, the official game has produced 12,246 unique cards.
Rares, the creator of Forge, generously shared his work as an open source project about five years ago. Since then, dozens of people have contributed their talents to evolve the codebase to the point it's reached today: a game engine that can successfully juggle 10^5 10^4 unique cards, available for free.
The honor of writing the 10,000th card has gone to an unnamed hero, which is suitable since it's these brave code warriors that make the game what it is. A well-deserved thanks to anyone who has volunteered their time to script, test, maintain, report, code, suggest, debug, design, or in any way contribute to this project.
A special thanks in particular to the CCGH web site and its administrators for providing us with the Forge forum, and to the unsung team of people who quietly maintain the servers which assist this project in one fashion or another.
With this in mind, we move onward and upward. Enjoy your next game of Forge!
{end quote}
I sarcastically asked, “What will the developers do once Forge supports every card in existence?” and someone replied, “Start debugging”. That was a joke but it was very funny. Although I know Forge can be buggy, it is also awesome. (I have heard much the same thing about Elder Scrolls V: Skyrim, awesome but buggy.)
Dark Ascension
I presume most people know about magiccards.info but I will mention it anyways. Magiccards.info is similar to Gatherer but has very, high-quality scans of Magic cards. You can view a visual spoiler for Dark Ascension at magicards.info here.
If you want to download all of the card pictures and peruse them offline, link (26 MB).
Deck Forum
Forge has a separate forum just for decks and you can upload and download a ton of new/different decks. The “New Quest Deck” post allows people to post decks and then adds them to the list of opponents for Forge’s quest mode. You can also download a different set of files for sealed and draft, which is called a “cube”. Another person posted the top 8 decks from the Grand Prix Lincoln 2012 as well as 256 decks from “Building on a Budget” which is posted weekly on dailymtg.com.
That is about it. Have a grape (great) week :)
-mtgrares
p.s.
I have started to get into miniature wargaming, which is pretty cool. I love making strategic decisions and talk about a genre that really needs a good videogame. Awhile ago I played a ton of Advance Wars for Gameboy Advance. While it isn't really a “wargame”, it is still an excellent game.
The Forge team is very happy to announce that Forge now supports more than 10,000 cards, which is a major milestone. Here is the announcement that they posted on the forum. (This relates to the 02-03 version which does not download the Dark Ascension card pictures.)
{begin quote}
The Forge team is very proud to announce that more than 10,000 cards are now available for play! This is an impressive amount, particularly considering that as of October 2011, the official game has produced 12,246 unique cards.
Rares, the creator of Forge, generously shared his work as an open source project about five years ago. Since then, dozens of people have contributed their talents to evolve the codebase to the point it's reached today: a game engine that can successfully juggle 10^5 10^4 unique cards, available for free.
The honor of writing the 10,000th card has gone to an unnamed hero, which is suitable since it's these brave code warriors that make the game what it is. A well-deserved thanks to anyone who has volunteered their time to script, test, maintain, report, code, suggest, debug, design, or in any way contribute to this project.
A special thanks in particular to the CCGH web site and its administrators for providing us with the Forge forum, and to the unsung team of people who quietly maintain the servers which assist this project in one fashion or another.
With this in mind, we move onward and upward. Enjoy your next game of Forge!
{end quote}
I sarcastically asked, “What will the developers do once Forge supports every card in existence?” and someone replied, “Start debugging”. That was a joke but it was very funny. Although I know Forge can be buggy, it is also awesome. (I have heard much the same thing about Elder Scrolls V: Skyrim, awesome but buggy.)
Dark Ascension
I presume most people know about magiccards.info but I will mention it anyways. Magiccards.info is similar to Gatherer but has very, high-quality scans of Magic cards. You can view a visual spoiler for Dark Ascension at magicards.info here.
If you want to download all of the card pictures and peruse them offline, link (26 MB).
Deck Forum
Forge has a separate forum just for decks and you can upload and download a ton of new/different decks. The “New Quest Deck” post allows people to post decks and then adds them to the list of opponents for Forge’s quest mode. You can also download a different set of files for sealed and draft, which is called a “cube”. Another person posted the top 8 decks from the Grand Prix Lincoln 2012 as well as 256 decks from “Building on a Budget” which is posted weekly on dailymtg.com.
That is about it. Have a grape (great) week :)
-mtgrares
p.s.
I have started to get into miniature wargaming, which is pretty cool. I love making strategic decisions and talk about a genre that really needs a good videogame. Awhile ago I played a ton of Advance Wars for Gameboy Advance. While it isn't really a “wargame”, it is still an excellent game.
Tuesday, February 21, 2012
Magic: The Gathering For iPhone and Android
(I don't have much to say this week.)
The Wagic project lets you play Magic on your iPhone or Android.
Wagic works on Windows, Linux, the nokia N900 (maemo), the Nokia N9 (meego), Android (tablets and phones), iOS(iPhone/iPad/iPad2) and the Sony PSP (Wagic does not require you to hack your PSP).
Wagic Link
The Wagic project lets you play Magic on your iPhone or Android.
Wagic works on Windows, Linux, the nokia N900 (maemo), the Nokia N9 (meego), Android (tablets and phones), iOS(iPhone/iPad/iPad2) and the Sony PSP (Wagic does not require you to hack your PSP).
Wagic Link
Saturday, February 11, 2012
Browsing Forge’s Source Code – Part Deux
Similar to the line that Morpheus said in the Matrix, “Some things changes and some things don’t.” Much of Forge has been changed and improved but the core foundation is the same. Card objects, hold one or more SpellAbility objects. Today I will be looking through the “creature cardfactory” that handles the weird, oddball abilities that are not scripted. (Scripting only cares about multiple cards with the same ability.)
The creature cardfactory is relatively small, only 2,600 lines including blank lines, and handles around 69 creatures. (You can view the Java source code here.) The first creature is one that I recognize “Force of Savagery”. It is an enigmatic 8/0 creature that only costs 2G. Obviously the key is that it needs to be pumped up by Glorious Anthem or similar cards.
The code below is just for the AI and checks to see if Glorious Anthem or its green cousin Gaea's Anthem is in play. The problem is that checking for specific cards is that new cards are added/created all of the time.
Drekavac is the next card that I recognize. I originally added it but the code has been updated as Forge has changed. Drekavac (2B, 3/3) the drawback is that you must discard a non-creature card. In the code that tells the AI not to play this card I see this comment.
This takes me back because that is my original comment. Now I know how to fix the problem but the AI probably should not play cards with a drawback anyways, since it cannot tell when the drawback is tactically prudent or not. I always liked using Drekavac for some reason.
The next card is Phylactery Lich. It is a pretty cool rare that gets you a 5/5 indestructible creature for only BBB if you own an artifact. The code here only deals with letting the player choose an artifact. Elsewhere, where static or state effects are checked, the code checks to see if the artifact with the phylactery counter is destroyed. The AI for this card is simple and just makes a “sanity check” to see if the computer has an artifact on the battlefield.
// TODO - this needs to be targeted
Technically Sky Swallower’s ability is targeted and Forge does not target the opponent because it makes the code a few lines shorter. I know that Magic has a few cards that give protection to a player but years ago, I knew that Forge did not have any of those cards. I used Forge’s excellent deck editor to search for cards that give protection to players and I could not find any but I could be wrong.
While these were just small snippets of code, it felt good to look at actual source code.
Huzzah,
mtgrares
p.s.
“Part deux” is taken from one of my favorite movies, “Hots Shots: Part Deux”. Deux is French for “two”.
The creature cardfactory is relatively small, only 2,600 lines including blank lines, and handles around 69 creatures. (You can view the Java source code here.) The first creature is one that I recognize “Force of Savagery”. It is an enigmatic 8/0 creature that only costs 2G. Obviously the key is that it needs to be pumped up by Glorious Anthem or similar cards.
The code below is just for the AI and checks to see if Glorious Anthem or its green cousin Gaea's Anthem is in play. The problem is that checking for specific cards is that new cards are added/created all of the time.
if (cardName.equals("Force of Savagery"))
{
final SpellAbility spell = new SpellPermanent(card)
{
public boolean canPlayAI()
{
final CardList list = AllZone.getComputerPlayer().
getCardsIn(Zone.Battlefield);
return list.containsName("Glorious Anthem")
|| list.containsName("Gaea's Anthem");
}
};
card.clearFirstSpell();
card.addSpellAbility(spell);
}Drekavac is the next card that I recognize. I originally added it but the code has been updated as Forge has changed. Drekavac (2B, 3/3) the drawback is that you must discard a non-creature card. In the code that tells the AI not to play this card I see this comment.
I could never get the AI to work correctly, it always played the same card 2 or 3 times
This takes me back because that is my original comment. Now I know how to fix the problem but the AI probably should not play cards with a drawback anyways, since it cannot tell when the drawback is tactically prudent or not. I always liked using Drekavac for some reason.
The next card is Phylactery Lich. It is a pretty cool rare that gets you a 5/5 indestructible creature for only BBB if you own an artifact. The code here only deals with letting the player choose an artifact. Elsewhere, where static or state effects are checked, the code checks to see if the artifact with the phylactery counter is destroyed. The AI for this card is simple and just makes a “sanity check” to see if the computer has an artifact on the battlefield.
public boolean canPlayAI()
{
return (!AllZone.getComputerPlayer()
.getCardsIn(Zone.Battlefield)
.getType("Artifact")
.isEmpty()
&&
AllZone.getZoneOf(this.getSourceCard()).
is(Constant.Zone.Hand));
}Sky Swallower is another card that I coded back in the day. Sky Swallower is another situational card that the AI plays badly. I thought it might be a good card but I don’t think I have ever won a game with it. I know it could win a game. In the code there is my original comment that has not been updated.// TODO - this needs to be targeted
Technically Sky Swallower’s ability is targeted and Forge does not target the opponent because it makes the code a few lines shorter. I know that Magic has a few cards that give protection to a player but years ago, I knew that Forge did not have any of those cards. I used Forge’s excellent deck editor to search for cards that give protection to players and I could not find any but I could be wrong.
While these were just small snippets of code, it felt good to look at actual source code.
Huzzah,
mtgrares
p.s.
“Part deux” is taken from one of my favorite movies, “Hots Shots: Part Deux”. Deux is French for “two”.
Subscribe to:
Posts (Atom)
















