TheManaDrain.com
October 04, 2025, 08:15:04 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: Ubastax computer programming experiment  (Read 4795 times)
vroman
Full Members
Basic User
***
Posts: 844


america is doomed

vromanLP
View Profile WWW Email
« on: October 01, 2006, 03:32:26 am »

Im writing an article for Starcity concerning Ubastax mulligans. For data I programmed random starting hands and calculated how much mana would be available on the first turn. by no means do I claim to be virtuoso programmer, and thus my system is probably very clunky. I wrote and ran it on the venerable TI83 calculator, as my C++ is incredibly rusty and I didnt want to go to the trouble of finding decent compiler/editor on the internet. its possible something equivalent to this already exists out there, but again, I wasnt interested in hunting around for someone else's solution.
writing the program was not too challenging, but tolarian academy's contributions was something of a sticky wicket, and some arbitrary decisions had to be made. for example:
[academy, mana crypt, null rod, 4xwelder]
this hand technically produces 4 mana, but only if I am willing to cast null rod. to incorporate the tendency for non-mana cards to improve academy's function, I would have to program in the converted cost of every single non-mana artifact. realistically, I DO pump academy in this way almost whenever possible, most notably with chalice. for this reason I compromised and programmed in dropping chalice@0 as a boost to academy, but left all other cards out of the equation. Academy also complicated things by not being able to cast solring/vault by itself, and that lotus might not stick around to pump.
The other tricky issue was how to simulate mulligans. If I simulate 100 seven card hands, some number of them are going to produce zero mana. these should not be part of the average, because obviously I would mulligan those hands, and I would not start my turn 1 with zero mana. Instead I should simulate 100 six card hands, and then every time I get a zero mana 7-card hand, I add the avg result of all 6-card hands to my running total, not zero.
For 1 mana hands its somewhat different, since there are plenty of keepable 1 mana hands (ie {mtn, welder, chalice, bazaar, duplicant, uba, smoky} or {chalice, strip, waste, waste, rishadan, crucible, null rod}) but I definitely tend to muligan 1 mana hands w no decent plays. thus for 1 mana hands, I substitute the mulligan constant, weighted by the percentage of the time I would mulligan those hands in real life.
I assume for the sake of this experiment that I keep all hands that produce 2+ mana, though in reality this is not the case.
so my procedure was:
simulate 100 five card hands, with average turn 1 mana Z
simulate 100 six card hands, where zero mana hands count for Z, and 1 mana hands count for (Z+1)/2, generating average Y
simulate 100 seven card hands, where zero mana hands count for Y, and 1 mana hands count for .75Y+.25, generating total average X.
The end result of the experiment, with these arbitrary mulligan and academy rules, is that ubastax generates on average 3.69 mana on the first turn.

keep in mind, the program is solely interested in the amount of mana generated on the first turn, not the total amount of mana in the hand. thus:
{mtn, mtn, waste, rishadan, b-ring, strip, crucible}
gets the exact same score as:
{waste, welder, smoky, uba, duplicant, tangle, crucible}
no regard is given to overall quality, only the exact amount of mana it produces on the first turn.

first some notes. I built my deck via a 60x1 matrix, w coded numbers:
0=spells/bazaars
1=single mana land
2=workshop
3=black lotus
4=mox
5=sol ring
6=mana vault
7=mana crypt
8=tolarian academy
9=chalice of the void
so there are twelve '1's, four '2's, one '3', five '4's, etc.

so heres the program, with my annotations.

:prgmCLRVARS
this is a subprogram that stores zero to all variables
:7->H
H=hand size. variable allows me to simulate mulligans, or after-draw scenarios
:60->D
D=cards in library. I sometimes made this smaller while de-bugging
:100->I
I=iterations. how many hands to generate before producing an average. 100 iterations takes approximately 6 minutes for the TI83 to run. perhaps it has to do w my obtuse programming methods
:2.85->O
O=mulligan substitution constant. this is the end result of running the program w one fewer card in hand, and is what is added to the total, if the hand generates mana below the mulligan threshold. if the simulation is not being run w mulligan possibilities, this line should be deleted.
:.5->P
P=percentage times mulligan w a 1 mana hand. assuming I will always keep a hand of 2+ mana, but only sometimes keep 1 mana hands, this variable weights 'O' proportionally. again, if no mulligans are being considered, this line should be deleted.
:Fill(0,[ B ])
its not necessary to record the hand results in matrix, if all you want is the end avg, but for de-bugging purposes, I liked to be able to see how many instances of each mana result were being generated. this line clears the results matrix, but should be deleted if not in use.
:For(G,1,I)
this generates 'I' hands.
:0->A
A=tolarian academy flag. all these flags need to be reset at the beginning of each hand
:0->L
L=land flag.
:0->M
M=mana this hand generates
:0->Q
Q=total amount of mana produced by academy+artifacts. used to compare in hands where there is academy and other lands.
:0->S
S=mox/manacrypt flag. this tells the program whether sol ring/vault can be used to pump academy.
:0->T
T=total number of academy pumpers.
:0->V
V=chalice flag. this flag keeps the program from letting more than one chalice@0 pump academy.
:0->W
W=workshop flag
:Fill(0,[C])
clear the hand matrix
:For(B,1,H)
begin loop to generate hand
:iPart(rand*D)+1->X
randomly pick a card
:If B>1
:Then
:For(E,1,B-1)
:While X=[C](E,2)
:iPart(randXD)+1->X
:End
:End
:End
if this is not the first card, check to make sure this card has not already been picked.
:X->[C](B,2)
store the card number to compare against future picks
:[ A ](X,1)->C
extract the code number from the deck list
:If C=1
:Then
:If L=1
:0->C
:1->L
:End
if the card is single-mana-land, and the land flag has not been tripped, trip the land flag, otherwise, ignore this card.
:If C=2
:Then
:1->L
:1->W
:End
if the card is workshop, trip both land flag and workshop flag
:If C=3
:Then
:M+3->M
:T+1->T
:End
if its black lotus, increase mana production by 3, and academy pumps by 1
:If C=4
:Then
:M+1->M
:T+1->T
:1->S
:End
if its mox, increase mana by 1, academy pumps by 1, and trip mox/crypt flag
:If C=7
:Then
:M+2->M
:T+1->T
:1->S
:End
if its crypt, increase mana by 2, academy pumps by 1, and trip mox/crypt flag
:If C=8
:1->A
if its academy, trip academy flag
:If C=9
:Then
:If V=1
:Then
:0->C
:Else
:T+1->T
:End
:1->V
:End
if its chalice, and the chalice flag has not been tripped, trip the chalice flag. otherwise ignore this card.
:C->[C](B,1)
:End
input the card in the hand matrix, and go back to beginning of loop
:For(B,1,H)
start another loop to check more information about hand
:[C](B,1)->C
extract card code from hand matrix
:If C=1 and W=1
:0->[C](B,1)
if its single-mana-land, and the workshop flag is tripped, ignore this card.
:If C=5 and (M>0 or L=1)
:Then
:M+1->M
:If S=1
:T+1->T
:End
this block checks whether sol ring is castable. if so, it adds mana. then pumps academy if mox/crypt flag is tripped.
:If C=6 and (M>0 or L=1)
:Then
:M+2->M
:If S=1
:T+1->T
:End
this block checks whether mana vault is castable. if so, mana is increased by 2, then academy is pumped if mox/crypt flag is tripped.
:End
end of the hand check loop
:If W=1
:0->L
if we have workshop, ignore single-mana-lands
:If A=1
:M+T->Q
if we have academy, then calculate how much total mana we have if academy is used.
:If L=1
:Then
:If Q>M+1
:Then
:Q->M
:Else
:M+1->M
:End
:End
single-mana-land is compared to academy's production (automatically zero if no academy)
:If W=1
:Then
:If Q>M+3
:Then
:Q->M
:Else
:M+3->M
:End
:End
workshop is compared to academy's production
:If A=1 and L=0 and W=0
:Q->M
if we have academy, and no other lands, store academy production in mana variable
:If M=0
:O->M
if this is a mulligan hand, substitute mulligan constant. delete this line if not using mulligans.
:If M=1
:O*P+(1-P)->M
if this is sometimes mulligan hand, substitute weighted mulligan constant. delete this line if not using mulligans.
:If M>0
:[ B ](iPart(M),1)+1->[ B ](iPart(M),1)
record mana result in matrix. delete these lines if not recording results.
:N+M->N
add to overall mana production from all hands
:End
:Disp N/I
final ouput is average mana produced in this number of hands.
« Last Edit: October 01, 2006, 01:09:56 pm by vroman » Logged

Unrestrict: Flash, Burning Wish
Restore and restrict: Transmute Artifact, Abeyance, Mox Diamond, Lotus Vale, Scorched Ruins, Shahrazad
Kill: Time Vault
I say things http://unpopularideasclub.blogspot.com
Machinus
Keldon Ancient
Full Members
Basic User
***
Posts: 2516



View Profile
« Reply #1 on: October 01, 2006, 07:00:10 am »

This is awesome. I hope this simulation can be upgraded to a C language as soon as possible.
Logged

T1: Arsenal
aryah
Basic User
**
Posts: 5


View Profile
« Reply #2 on: October 01, 2006, 08:13:27 am »

I hope the code is made public domain by this postng :lol:

I'll try doing something like this (not sure Id use C over Python or Haskell though) in a day or so the latest. This posted code can imo be allmost directly translated to any imperative language, but making it less stax specific could be an interesting exercise ..

btw, anyone know what other kinds of software tools might be needed in the magic community? What other kinds of statistical analyses  could be interesting to magic community? Im also toying with the idea of a free software apprentice clone...
Ive seen a few related projects, will do some research into their status and options...
« Last Edit: October 01, 2006, 08:43:10 am by aryah » Logged
meadbert
Adepts
Basic User
****
Posts: 1341


View Profile Email
« Reply #3 on: October 01, 2006, 12:35:09 pm »

I am a C programmer by trade and I have written many C programs in the past although I lost my two favorite.  I am considering rewriting both.

I have a C program in particular that allows for just what is being discussed here.

I will write the language in C but I will provide a different language for uses to use.

A short file would look like this:

deck {
  40 RavenousRats
  20 Swamps
}

Rule ManaShaft 0 {
  Swamps < 2
}

Rule Rats RavenousRats {

}

End example

The format would be:

decklist as seen above

Rule RULE_NAME RULE_SCORE {
  CHECK_ONE
  CHECK_TWO
  ...
}

You can also have variables although I forget the syntax.

There must be one rule with empty checks so every opening hand has an answer.

Anyway, I would like to distribute this program.  I have the C code, but for those who do not have access to a C compiler I would also like to post an executable compiled on windows XP.  Would is possible and permisable on the mana drain?


Logged

T1: Arsenal
Pathian
Basic User
**
Posts: 54


m4d.sk1liz

UnicityPoint
View Profile
« Reply #4 on: October 01, 2006, 01:46:21 pm »

A very interesting program from a statistical perspective. I've done my best to convert it into a C++ program. Being a college student, I've got my copy of Visual Studio .NET sitting around, so I went ahead with it. I did change a few aspects of the original program logic for a few reasons, but the logic of determining the amount of mana in an individual hand remains the same (or it should have, go ahead and check my work, the Jets and Colts are playing right now, so my work quality may have slipped off towards the end). But anyway, here is the list of significant changed to the logic.

*I used a vector instead of an array, seemed significantly easier since I don't have to keep track of the size of things constantly.
*Changed the method by which the hand is constructed. Instead of selecting a random value from the array (vector) to start and selecting another and comparing it to every other value in the array, I randomly selected a value out of the vector, added it to the hand, and deleted it from the deck for each card. It's statistically identical to the previous method, but saves processing time because the processor isn't performing 60 additional (comparison) operations for cards 2 through 7 for each iteration (360 per iteration). After each iteration, the cards in hand are reinserted into the vector.
*3.69 seems a bit high for the true average. It might be an outlier. Just to be certain, I upped the iterations to 200,000
*Changed the single letter variables to more descriptive names to make it more understandable.

Away we goooo...

#include <iostream>
#include <cstdlib>
#include <vector>
#include <string>
#include <ctime>
using namespace std;

int main()
{
   //initialize variables
   int Iterations = 200000, handSize = 7;
   const double constMulligan = 2.85;
   const double constMullPercent = .5;
   vector <string> deck;
   srand(time(0));
   
   
   for(int i=1;i<=30;i++)
   {
      deck.push_back("SpellOrBazaar");
   }
   for(int i=1;i<=12;i++)
   {
      deck.push_back("OneManaLand");
   }
   for(int i=1;i<=4;i++)
   {
      deck.push_back("Workshop");
   }
   for(int i=1;i<=5;i++)
   {
      deck.push_back("Mox");
   }
   for(int i=1;i<=4;i++)
   {
      deck.push_back("CotV");
   }
   deck.push_back("Academy");
   deck.push_back("Crypt");
   deck.push_back("Vault");
   deck.push_back("Sol");
   deck.push_back("Lotus");
   //DECK IS GENERATED

   //card flags set

   vector <string> hand;//create the hand

   double TotalMana = 0;

   for(int k = 1;k<=Iterations;k++)
   {
      int AcademyFlag = 0;
      int LandFlag = 0;
      int AcademyHandMana = 0;
      int MoxCryptFlag = 0;
      int AcademyPumps = 0;
      int CotVFlag = 0;
      int ShopsFlag = 0;
      int ThisHandMana = 0;
      for(int i=1;i<=handSize;i++)
      {

         int randVar = rand()%deck.size(); //generate a number from 0 to 59
      
         string card = deck.at(randVar);

         if(card=="OneManaLand")
         {
            LandFlag = 1;   
         }//if it's a land, trip land flag
         if(card=="Workshop")
         {
            LandFlag = 1;
            ShopsFlag = 1;   
         }//if a shop, trip land flag and shop flag
         if(card=="Lotus")
         {
            ThisHandMana = ThisHandMana+3;
            AcademyPumps = AcademyPumps++;   
         }//if lotus, add 3 to total mana and add 1 to academy pumps
         if(card=="Mox")
         {
            ThisHandMana = ThisHandMana++;
            AcademyPumps = AcademyPumps++;
            MoxCryptFlag = 1;   
         }//if mox, add 1 to mana, 1 to academy pump, and trip mox/crypt flag
         if(card=="Crypt")
         {
            ThisHandMana = ThisHandMana+2;
            AcademyPumps = AcademyPumps++;
            MoxCryptFlag = 1;   
         }//if crypt, add 2 to mana production, add 1 to academypump, and trip mox/crypt flag
         if(card=="Academy")
         {
            AcademyFlag = 1;   
         }//if TA, trip academy flag
         if(card=="CotV")
         {
            if(CotVFlag = 0)
            {
            AcademyPumps = AcademyPumps++;
            }
            CotVFlag = 1;
         }//If I draw CotV and I don't have one yet, add 1 to AcademyPump and trip CotV flag
      
         hand.push_back(card);
         //store the card in hand
         deck.erase(deck.begin() + randVar);
         //erase the card from the deck
      
      }//This loop will generate a single hand and trip flags


      for(int j=1;j<=hand.size();j++)
      {
         string card = hand.at(j-1);
         if(card == "OneManaLand" && ShopsFlag == 1)
         {
            //ignore a 1 mana land in favor of shop
         }
         if(card == "Sol" && (ThisHandMana > 0 || LandFlag == 1))   
         {
            ThisHandMana = ThisHandMana++;
            if(MoxCryptFlag == 1)
            {
               AcademyPumps = AcademyPumps++;
            }
         }//if Sol Ring is castable, add 1 to mana, and if we have a mox or crypt add 1 to academy pumps
         if(card == "Vault" && (ThisHandMana > 0 || LandFlag == 1))   
         {
            ThisHandMana = ThisHandMana+2;
            if(MoxCryptFlag == 1)
            {
               AcademyPumps = AcademyPumps++;
            }
         }//if vault is castable add 2 to mana, if we have mox or crypt, add 1 to academy pumps
      }//end the hand check loop
      
      if(ShopsFlag == 1)
      {
         LandFlag = 0;
      }
      if(AcademyFlag == 1)
      {
         AcademyHandMana = ThisHandMana + AcademyPumps;
      }
      if(LandFlag == 1)
      {
         if(AcademyHandMana > ThisHandMana + 1)
         {
            ThisHandMana = AcademyHandMana;
         }//if the mana generated by academy is greater than artifact mana+1, academyhandmana is total mana
         else
         {
            ThisHandMana = ThisHandMana++;
         }//otherwise use the 1 mana land
      }
      if(ShopsFlag == 1)
      {
         if(AcademyHandMana > ThisHandMana+3)
         {
            ThisHandMana = AcademyHandMana;
         }//if Academy is better than Shop, use academyhandmana
         else
         {
            ThisHandMana = ThisHandMana+3;
         }//if shop is better, add 3 to mana
      }
      if(AcademyFlag == 1 && LandFlag == 0 && ShopsFlag == 0)
      {
         ThisHandMana = AcademyHandMana;
      }//if we only have academy, mana is academyhandmana

      
      if(ThisHandMana == 0)
      {
         ThisHandMana = constMulligan;
      }//mulligan our 0 mana hand into the mulligan constant
      
      if(ThisHandMana == 1)
      {
         ThisHandMana = constMulligan*constMullPercent + (1-constMullPercent);
      }//mulligan our 1 mana hand into the weighted mulligan constant


      TotalMana = TotalMana+ThisHandMana;

      int loopconst = handSize;
      for(int j=1;j<=handSize;j++)
      {
         deck.push_back(hand.at(0));
         hand.erase(hand.begin());
      }//toss the hand back in the deck
   }
   cout << "Average Mana: " << TotalMana/Iterations << endl;
}

After running this code three times (took about 2 minutes a piece, good thing I cut those 360 operations per iteration (72 million total) otherwise I'd have been here a while), I come up with a total average mana of 3.28266, 3.28941 and 3.28775. That's why I felt like 3.69 felt like an outlier. Of course I could have messed something up in translating the TiBasic Logic to C++, so feel free to check my work.

EDIT:
So I went back and reread the initial post and reworked the method. The code I posted reflects the code you posted in that some number of 7 card hands are generated, 2.85 is substituted for all 0 mana hands, and 1.925 is substitutded for all 1 mana hands yielding an average mana on the order of 3.28.

However, if I go back to the way to said it was initially done ...
simulate 100 five card hands, with average turn 1 mana Z
simulate 100 six card hands, where zero mana hands count for Z, and 1 mana hands count for (Z+1)/2, generating average Y
simulate 100 seven card hands, where zero mana hands count for Y, and 1 mana hands count for .75Y+.25, generating total average X.

I substituted 100 hands with 200000 hands in each case to get a more balanced sample mean. This yields...
Z = 2.475 (no mulligan rules)
Y = 2.955 (2.475 substituting for 0 mana hands, 1.7375 subsituting 1 mana hands)
X = 3.454 (2.955 substituting for 0 mana hands, 2.466 substituting 1 mana hands)

So using the code as I wrote it using your logic as a guide (which I still admit I may have made a transcription error at some point), I arrive at a mean of 3.28

Using the same program but running it for averages at 5, 6 and 7 card hands, I arrive at a mean of 3.454 mana.

I feel that the second figure is a better estimator of the true average mana of a starting hand since it relies on direct statistical data at 3 levels than on the a single projected constant at 1 level.
« Last Edit: October 01, 2006, 02:28:41 pm by Pathian » Logged

TK: Tinker saccing Mox.
Jamison: Hard cast FoW.
TK: Ha! Tricked you! I'm out of targets
vroman
Full Members
Basic User
***
Posts: 844


america is doomed

vromanLP
View Profile WWW Email
« Reply #5 on: October 01, 2006, 02:45:41 pm »

A very interesting program from a statistical perspective. I've done my best to convert it into a C++ program.

Using the same program but running it for averages at 5, 6 and 7 card hands, I arrive at a mean of 3.454 mana.

thanks a lot for doing this! your program is clearly more streamlined and accurate. Im just self-taught dabbler in programming, so I appreciate the expert help. I will quote your end result of 3.454 in my article.
Logged

Unrestrict: Flash, Burning Wish
Restore and restrict: Transmute Artifact, Abeyance, Mox Diamond, Lotus Vale, Scorched Ruins, Shahrazad
Kill: Time Vault
I say things http://unpopularideasclub.blogspot.com
Evenpence
Basic User
**
Posts: 815


AlphaFoNGGGG
View Profile Email
« Reply #6 on: October 02, 2006, 10:12:28 am »

Vroman, 3.5 seems really correct.  When I draw lower, I almost always mulligan, unless it's like a Barbarian Ring, 2x Welder, 1x Bazaar, 3x random hand and I'm playing against something slow.

Your mulligan decisions are probably the best out of anyone who plays Ubastax, and I know I've learned alot from your tournament reports with regards to what hands to keep against what decks.

I usually use the rule of first turn lock artifact or first turn welder with second turn lock or the hand has to be mulliganed.  Of course, there are exceptions, but the deck really favors greediness and everytime I've mulliganed to five, I've drawn into the absolute nuttiness of like Workshop + Lotus + 3 amazing cards or something similiar.  This has happened at least five times.  I believe it's the most favorable deck I've ever played with regards to mulligans.

I've also enjoyed reading your primer on mulligans with regard to if it's more important to mulligan more on the play than on the draw - I stalk you even more than you think.  Smile

I will be very interested to read the article, and maybe I can even help you if you'd like to send it to me before you send it to SCG.
Logged

Quote
[17:25] Desolutionist: i hope they reprint empty the warrens as a purple card in planar chaos
yespuhyren
Basic User
**
Posts: 727


I AM the Jester!

poolguyjason@hotmail.com
View Profile Email
« Reply #7 on: October 02, 2006, 12:28:52 pm »

Colby, where did you find that stuff?  I haven't seen any info on mulling that I know of.  The three of us should really co-write some beast of an article focussing on our similarities and differences Very Happy
Logged

Team Blitzkrieg:  The Vintage Lightning War.

TK: Tinker saccing Mox.
Jamison: Hard cast FoW.
TK: Ha! Tricked you! I'm out of targets
Evenpence
Basic User
**
Posts: 815


AlphaFoNGGGG
View Profile Email
« Reply #8 on: October 02, 2006, 12:38:47 pm »

It's Vroman's baby - he can ask for our help if he wants it - I think he has a definite progression of thought on the issue and he probably doesn't need our advice to chime in with regard to mulliganing decisions.  Besides, it's pretty obvious to the experienced Ubastax player (especially Vroman), so I doubt anything we say will be revolutionary.

An article on sideboarding would be really nice from Vroman though - I like talking theory about SBing more than anything else.
Logged

Quote
[17:25] Desolutionist: i hope they reprint empty the warrens as a purple card in planar chaos
Largent
Basic User
**
Posts: 45



View Profile Email
« Reply #9 on: October 02, 2006, 01:39:48 pm »

FYI JAVA is free and cross platform.
Logged

Team RIT - Raw dog it
xycsoscyx
Basic User
**
Posts: 112


Death is only the beginning...

10886322 xycsoscyx@hotmail.com xycsoscyx xycsoscyx
View Profile WWW Email
« Reply #10 on: October 02, 2006, 02:55:20 pm »

So the next step is to digitize Vroman's brain, ala Max Headroom, and make it available on things like PDA's.  That way everyone can have a PocketVroman ready for when they need to decide if they should mulligan or not.  XD  Hmmm, Vroman, you up for being a guinea pig for a little while?
Logged
Pathian
Basic User
**
Posts: 54


m4d.sk1liz

UnicityPoint
View Profile
« Reply #11 on: October 04, 2006, 09:10:28 pm »

A very interesting program from a statistical perspective. I've done my best to convert it into a C++ program.

Using the same program but running it for averages at 5, 6 and 7 card hands, I arrive at a mean of 3.454 mana.

thanks a lot for doing this! your program is clearly more streamlined and accurate. Im just self-taught dabbler in programming, so I appreciate the expert help. I will quote your end result of 3.454 in my article.

No problem, always appreciate being namedropped in a big article Wink I found rewriting the program very interesting as an excercise, I'm hoping it can be modified to other decks and situations from a statistical standpoint.
Logged

TK: Tinker saccing Mox.
Jamison: Hard cast FoW.
TK: Ha! Tricked you! I'm out of targets
Anusien
Adepts
Basic User
****
Posts: 3669


Anusien
View Profile
« Reply #12 on: October 10, 2006, 11:02:18 pm »

If I can find it, I have a library set up in Java that's in need of a project.  It can read in .dec or .mwsdeck (I think) files to generate a deck, and has the basic functionality to mainpulate cards between zones.  As an example, I sat it into an IRC bot for a while and was goldfishing DeathLong hands.  Originally I set it up to simulate shuffling instead of randomization.  The idea was to model the way people actually shuffle (riffle and pile shuffles), add a small factor of randomization, and then set up the deck.  I was originally going to test turn 1 Force of Will probabilities, but it can easily be extended to this project or anything like that.  Is there interest in the concept?
Logged

Magic Level 3 Judge
Southern USA Regional Coordinator

Quote from: H.L. Mencken
The urge to save humanity is almost always a false front for the urge to rule.
xycsoscyx
Basic User
**
Posts: 112


Death is only the beginning...

10886322 xycsoscyx@hotmail.com xycsoscyx xycsoscyx
View Profile WWW Email
« Reply #13 on: October 11, 2006, 02:52:04 pm »

Hmm, here's what we need.  We need a 3D Simulation program, that can load a deck and associated card images, that uses an advanced rigid body physics simulation and collision detection.  We can load models for custom sleeves (primarily the most popular brands), and input things like card weights (foil/regular, etc), and actually shuffle the deck using interactive physics (riffle, piles, standard card shuffling, etc).  Then we can calculate draws based on that, actually getting to see what we are drawing in full 3D.  Now, who's with me on this?  I have an advanced interactive 3D engine with support for dynamic rigid body physics!  XD

On a more serious note, doesn't MWS actually have the utilities for calculating these things, is it invalid or incorrect?
« Last Edit: October 11, 2006, 02:54:41 pm by xycsoscyx » Logged
yespuhyren
Basic User
**
Posts: 727


I AM the Jester!

poolguyjason@hotmail.com
View Profile Email
« Reply #14 on: October 11, 2006, 07:02:31 pm »

It has basic things like how often you will get certain cards in hand and in what combination.  It doesn't compute the advanced mathematics that we are interested in for this scenario.
Logged

Team Blitzkrieg:  The Vintage Lightning War.

TK: Tinker saccing Mox.
Jamison: Hard cast FoW.
TK: Ha! Tricked you! I'm out of targets
GUnit
Basic User
**
Posts: 169


thingstuff@hotmail.com
View Profile Email
« Reply #15 on: October 11, 2006, 07:47:09 pm »

It really should be approximately random.

You may be shuffling *roughly* the same way every time, but the order that the cards are in when you begin the shuffling is pretty random. I know after I finish a game I just mash my permanents, graveyard and hand (often less than half my library is remaining at the end of a game) randomly together and then proceed into my routine which consists of riffle and pile shuffling. Unless your computer program is accounting for the state that the cards are in and the manner by which they're combined back into your library at the end of each game then your results won't be very informative. I think it's safe to conclude that there is enough randomness involved for the statistics of a "random" model to be accurate.
Logged

-G UNIT

AKA Thingstuff, Frenetic
Komatteru
Full Members
Basic User
***
Posts: 783

Joseiteki


View Profile
« Reply #16 on: October 11, 2006, 10:11:18 pm »

I haven't taken stochastic processes yet.  Maybe I'll have more insight later in this term as we get deeper into my current probability course (mostly deterministic stuff, but we'll talk about Markov Chains toward the end).  Right now, my knowledge of Markov modelling and modeling stochastic processes is pretty weak, so I'm not much help at the current moment.
Logged
unknown.root
Basic User
**
Posts: 76


View Profile
« Reply #17 on: October 16, 2006, 04:44:50 pm »

So the next step is to digitize Vroman's brain, ala Max Headroom, and make it available on things like PDA's.  That way everyone can have a PocketVroman ready for when they need to decide if they should mulligan or not.  XD  Hmmm, Vroman, you up for being a guinea pig for a little while?

Vroman's brain would resist it and fight back. However when it comes to Uba mask interactions or one of those "What would Vroman do?" situations it's nice to have the guy on speed dial.
Logged

- TEAM GWS -
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.05 seconds with 20 queries.