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

Land Threading

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

Land Threading

Postby DennisBergkamp » 05 Mar 2009, 17:20

This is for you deck builders who want to make some AI tuned decks with dual lands.
Currently, there's some bugs with the AI trying to figure out what land to tap first (I think this only happens with 5-color cards like Child of Alara, Sliver Queen, etc., possibly also with 4-color cards), but hopefully I can figure out some algorithm that solves this.
For the time being, AI land stacking combined with the correct lands in the deck should solve this issue to a certain extent.

This is how land is threaded:
Code: Select all
String[] allLand = {"Bayou", "Volcanic Island", "Savannah", "Badlands", "Tundra",
                   "Taiga", "Underground Sea", "Plateau", "Tropical Island", "Scrubland",
                   "Overgrown Tomb", "Steam Vents", "Temple Garden", "Blood Crypt", "Hallowed Fountain",
                   "Stomping Ground", "Watery Grave", "Sacred Foundry", "Breeding Pool", "Godless Shrine",
                   "Pendelhaven", "Flagstones of Trokair",
                   "Forest", "Swamp", "Mountain", "Island", "Plains",
                   "Treetop Village", "Ghitu Encampment", "Faerie Conclave", "Forbidding Watchtower",
                   "Savage Lands", "Arcane Sanctum", "Jungle Shrine", "Crumbling Necropolis", "Seaside Citadel",
                   "Elfhame Palace", "Coastal Tower", "Salt Marsh",
                   "Kher Keep", "Library of Alexandria" };
What this means, is that lands will be stacked in the computer's deck in this order, EXCEPT the first land gets skipped. So, if you would have a deck with a bunch of Bayou, Tundra, Scrubland, and say Island, the top cards of the computer's library should look like this:

non-land card
non-land card
non-land card
non-land card
non-land card
non-land card
non-land card
Tundra
Scrubland
Island
Bayou
Tundra
non-land card
Scrubland
non-land card
Island

Note that in the current version the cards denoted as "non-land card" could be lands. I got this fixed for the next version. Without this fixed, it makes the AI less efficient first of all (since he will draw too many lands). And also unpredictable in what order it will play lands, which could cause the "Computer is thinking..." bug.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Land Threading

Postby Chris H. » 05 Mar 2009, 22:48

I have been playing around with dual lands and forge 03-03 for a while. I assigned my Animas Armageddon deck to the computer. There are only a few two color cards and one requiring three colors.

The computer had only two lands in play, both of them were Taiga. The computer tapped both lands and then hangs with the message:

Phase: Main2
Computer is thinking

The only cards in this deck requiring two mana are:

Druid of the Anima
Eladamri's Call
Magus of the Library
Serra Avenger
Watchwolf

The land for this deck:

4x Taiga
4x Plateau
4x Savannah
4x Jungle Shrine

I'm looking at your list for the order for these lands to be threaded:

Savannah - Taiga - Plateau

EXCEPT the first land gets skipped:

So I should have seen the first two lands played as:

Taiga - Plateau

This would have given the computer the W G that it needed to cast Eladamri's Call or Watchwolf. The computer tried to cast one of these two spells expecting to have a Taiga + Plateau in play. Instead it found that it had Taiga - Taiga. It had the green needed but no white. Hmmm ...



The creature and artifact mana producing cards appear to be functioning and can be used at this time for AI decks.

The next release should give us functional dual lands for AI decks. :)
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: Land Threading

Postby DennisBergkamp » 05 Mar 2009, 22:57

EXCEPT the first land gets skipped:

So I should have seen the first two lands played as:

Taiga - Plateau

This would have given the computer the W G that it needed to cast Eladamri's Call or Watchwolf. The computer tried to cast one of these two spells expecting to have a Taiga + Plateau in play. Instead it found that it had Taiga - Taiga. It had the green needed but no white. Hmmm ...



The creature and artifact mana producing cards appear to be functioning and can be used at this time for AI decks.

The next release should give us functional dual lands for AI decks. :)
Yes, this is because in the 03/03 version the first 7 non-land cards will most probably have lands in them, so the AI will play lands in a random order.
By the way I'm not sure how "EXCEPT the first land" rule works, since I had a deck with Plains and Flagstones of Trokair in it, and Plains was the first card the AI played. Maybe it depends on whether the different amount of land types is odd or even, I don't know...
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Land Threading

Postby DennisBergkamp » 05 Mar 2009, 23:05

The computer had only two lands in play, both of them were Taiga. The computer tapped both lands and then hangs with the message:
Hmm, I cannot reproduce this, can you post the deck?
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Land Threading

Postby Chris H. » 06 Mar 2009, 00:19

DennisBergkamp wrote:
The computer had only two lands in play, both of them were Taiga. The computer tapped both lands and then hangs with the message:
Hmm, I cannot reproduce this, can you post the deck?
http://www.slightlymagic.net/forum/viewtopic.php?f=48&t=758
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


Return to Forge

Who is online

Users browsing this forum: No registered users and 90 guests


Who is online

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

Login Form