Elements the Game Forum - Free Online Fantasy Card Game

Other Topics => Elements Portal => Elements Tools => Topic started by: Xenocidius on September 18, 2011, 07:29:04 am

Title: Elements Slot Machine Simulator
Post by: Xenocidius on September 18, 2011, 07:29:04 am
Introducing the XenoSimâ„¢!

Using the slot machine algorithm provided by Dark Weaver, I wrote a small (actually, it's gotten quite large) program to simulate how many cards would be won in a certain number of games against a given deck.

>> Open the XenoSimâ„¢ in a new window << (http://xenocidius.webs.com/slotmachinesimulator.htm)

Basically, you copy and paste a deck code, enter the amount of games you would like to win, and it will run a simulation, then return the number of cards it won and the number of games in which it won a card.

It can handle 10000 games pretty soundly, but can get quite slow with significantly higher numbers.

Thoughts? Queries? Suggestions?

Thanks to:
Title: Re: Elements Slot Machine Simulator
Post by: PlayerOa on September 18, 2011, 07:30:41 am
Awesome work, Xeno.
Title: Re: Elements Slot Machine Simulator
Post by: Xenocidius on September 24, 2011, 06:18:49 am
Updated! It is now in Gamma (I'm not that familiar with version naming, but whatever)!

The new version can be found here (http://xenocidius.webs.com/simulator.htm).

New features:
Be sure to post suggestions for new features and general feedback.
Title: Re: Elements Slot Machine Simulator
Post by: Xenocidius on September 24, 2011, 11:24:28 am
Another update.

New features:
I'm also considering adding an index of every card in the game. This would also allow me to add an option to select whether the spin allows upgraded cards, and would automatically downgrade them if not. It would also replace the ugly card code in the output table with the card name.

Thoughts?
Title: Re: Elements Slot Machine Simulator
Post by: Xenocidius on September 24, 2011, 02:58:44 pm
Awesome Update Alert

It is now in Delta.

New features:
Title: Re: Elements Slot Machine Simulator
Post by: Bhlewos on September 25, 2011, 01:44:02 am
Awesome work, Xeno, +rep.

One question -- I input Decay's deck in here, and got back an "undefined". I thought it might be the mark so I took that out, but I still got the result:

(http://i786.photobucket.com/albums/yy150/BhlewosAQW/ElementsTheGame/XenoSim.png)

Here's the deck for reference.

by Bhlewos
Hover over cards for details, click for permalink
Deck import code : [Select]
7t6 7t6 7t6 7t6 7t6 7t6 7t8 7t9 7t9 7ta 7tc 7tc 7tc 7tc 7tc 7tc 808 808 808 808 808 808 808 80e 80i 80i 80i 80i 80i 80i 8pt


EDIT: Actually, by process of elimination, it seems to be Eclipse?
Title: Re: Elements Slot Machine Simulator
Post by: Xenocidius on September 25, 2011, 01:46:46 am
Yep, that's Eclipse. It must not be in the database - I'll put it in. Thanks. :)

Edit: Fixed. It should work now.
Title: Re: Elements Slot Machine Simulator
Post by: Xenocidius on September 25, 2011, 03:39:26 am
What's this, another update?

New features:
And now it does everything I originally intended it to do, so I guess it's in Omega.

I hope you enjoy the tool.
Title: Re: Elements Slot Machine Simulator
Post by: rosutosefi on September 25, 2011, 03:43:49 am
Like my card spin simulator, with 9001x user-friendliness  :D
Title: Re: Elements Slot Machine Simulator
Post by: Xenocidius on September 25, 2011, 11:21:48 am
Oh well, there's always time for one more update.

New features:
Here's an example of the code created by the program:

by Xenocidius
Hover over cards for details, click for permalink
Deck import code : [Select]
61o 61o 61o 61o 61o 61o 61o 61o 61o 61o 61o 61o 61o 61o 61o 61q 61q 61q 61r 61r 61s 61s 61t 61t 61t 61t 61t 61u 61u 61v 61v 61v 620 620 620 620 623 623 623 623 624 624 8pu

Runs: 100000
Upgraded spin: No

Cards won: 41315
Cards per game: 0.413
Droprate (%): 33.584

Extra electrum won: 2365006
Extra electrum per game: 23.65

Card
Won (total)
% of all cards won
Won (per game)
Aether Pillar3940.950.004
Lightning424910.280.042
Parallel Universe23135.600.023
Immortal23155.600.023
Dimensional Shield970223.480.097
Lobotomizer23585.710.024
Phase Dragon430610.420.043
Phase Spider667416.150.067
Mindgate674516.330.067
Silence22595.470.023
Title: Re: Elements Slot Machine Simulator
Post by: rosutosefi on September 25, 2011, 12:52:49 pm
Play 1000000 games!
It only lasts 1-2 mins. ;D
Title: Re: Elements Slot Machine Simulator
Post by: Bhlewos on September 25, 2011, 08:00:21 pm
=O You used my nickname for the "XenoSim"! =D

Just out of curiosity, I took a list of the card droprates of all the False Gods then ranked them from highest droprate to lowest -- plus most-won card, just because. 10,000 runs for all of them.

False GodCard DroprateMost Won Card
Divine Glory48.76Morning Glory
Decay45.50Fractal
Octane44.29Unstable Gas
Jezebel43.33Nymph's Tears
Akebono42.82Massive Dragon
Eternal Phoenix41.83Minor Phoenix
Osiris41.50Pharaoh
Hecate41.40Voodoo Doll
Fire Queen40.16Feral Bond
Gemini39.14Twin Universe
Serket38.41Deathstalker
Incarnate37.91Vampire
Obliterator37.86Elite Shrieker
Graviton37.23Graviton Firemaster
Paradox36.70Improved Blessing/Elite Deja Vu (tie)
Lionheart36.69Crusader
Neptune36.47Shockwave
Destiny35.66Fate Egg
Ferox35.39Ray of Light
Seism33.57Elite Graboid
Dark Matter33.23Black Hole
Chaos Lord32.58Supernova/Ray of Light (tie)
Morte31.97Retrovirus
Hermes31.28Lava Destroyer
Elidnis30.91Forest Spectre
Dream Catcher30.88Supernova
Miracle30.49Elite Queen
Scorpio30.26Pufferfish
Rainbow29.58Electrum Hourglass
A few things:
Title: Re: Elements Slot Machine Simulator
Post by: Xenocidius on September 25, 2011, 11:57:12 pm
Ah, thanks for that. Crusader and Condor should now be registered by the database.

And well done with the droprate table. I somewhat neglect droprate, instead preferring number of cards won per game, but it seems they are not the same; Decay is much lower on the scale of cards per game.
Title: Re: Elements Slot Machine Simulator
Post by: Jangoo on September 29, 2011, 06:41:54 am
=O You used my nickname for the "XenoSim"! =D

Just out of curiosity, I took a list of the card droprates of all the False Gods then ranked them from highest droprate to lowest -- plus most-won card, just because. 10,000 runs for all of them.

False GodCard DroprateMost Won Card
Divine Glory48.76Morning Glory
Decay45.50Fractal
Octane44.29Unstable Gas
Jezebel43.33Nymph's Tears
Akebono42.82Massive Dragon
Eternal Phoenix41.83Minor Phoenix
Osiris41.50Pharaoh
Hecate41.40Voodoo Doll
Fire Queen40.16Feral Bond
Gemini39.14Twin Universe
Serket38.41Deathstalker
Incarnate37.91Vampire
Obliterator37.86Elite Shrieker
Graviton37.23Graviton Firemaster
Paradox36.70Improved Blessing/Elite Deja Vu (tie)
Lionheart36.69Crusader
Neptune36.47Shockwave
Destiny35.66Fate Egg
Ferox35.39Ray of Light
Seism33.57Elite Graboid
Dark Matter33.23Black Hole
Chaos Lord32.58Supernova/Ray of Light (tie)
Morte31.97Retrovirus
Hermes31.28Lava Destroyer
Elidnis30.91Forest Spectre
Dream Catcher30.88Supernova
Miracle30.49Elite Queen
Scorpio30.26Pufferfish
Rainbow29.58Electrum Hourglass
A few things:
  • 10k runs still isn't the most accurate, so take these with a grain of salt, but only a grain. Running multiple tests on the same False God, for example, gave a max of 1 percent difference either way, so these can be taken to be pretty accurate.
  • Matches up with experience as well. For example any long-time veteran FG farmer can tell you Divine Glory and Decay have the best droprates, whereas Rainbow is the clear loser of the bunch (as if anyone needed another reason to skip him).
  • Most won cards shouldn't be seen as anything other than a ballpark. While some (Pharaoh for Osiris and Graviton Firemaster for Graviton) were pretty obvious -- both approached 50% out of the cards won -- others, like Supernova for Dream Catcher, were pretty close to the "second place" cards and could will be different for new tests.
  • I found two more cards that the XenoSim registers as "undefined" -- Crusader and Condor.
The numbers don't match DarkWeavers calculations which have been verified by empirical testing in over 13k games (against all gods that is):

FGDarkWeaverMerged studiesSample size
Akebono
Chaos Lord
Dark Matter
Decay
Destiny
Divine Glory
Dream Catcher
Elidnis
Eternal Phoenix
Ferox
Fire Queen
Gemini
Graviton
Hecate
Hermes
Incarnate
Jezebel
Lionheart
Miracle
Morte
Neptune
Obliterator
Octane
Osiris
Paradox
Rainbow
Scorpio
Seism
Serket
58,63%
38,68%
41,26%
61,41%
44,74%
68,00%
37,58%
37,33%
56,25%
44,43%
50,92%
49,76%
46,88%
54,71%
39,26%
48,34%
59,72%
47,36%
37,75%
37,84%
47,07%
48,15%
59,71%
57,22%
48,19%
36,10%
36,54%
41,99%
48,29%
56,86%
40,71%
38,40%
59,74%
43,54%
80,80%
34,02%
35,07%
43,42%
50,28%
51,94%
44,39%
45,88%
56,29%
30,99%
45,51%
54,13%
39,29%
37,37%
34,45%
41,14%
44,83%
54,74%
54,75%
52,16%
31,78%
37,21%
41,46%
42,92%
204
140
125
154
294
125
97
211
76
177
206
223
85
167
71
334
109
252
281
209
333
203
137
179
324
107
129
164
219
Don't match ... at all.


Title: Re: Elements Slot Machine Simulator
Post by: Xenocidius on September 29, 2011, 06:51:49 am
Droprate =/= Cards won per game. You'll find if you run a few of the FG decks through the simulator that the cards won per game will match up almost perfectly with Dark Weaver's stats.

For example, here's Divine Glory:

by Xenocidius
Hover over cards for details, click for permalink
Deck import code : [Select]
7dg 7dg 7dg 7dm 7dm 7dm 7dm 7dm 7dm 7jo 7jo 7jo 7jo 7jo 7jo 7jo 7jo 7jo 7jo 7jo 7jo 7jo 7k1 7k1 7k1 7k1 7k1 7k1 7k2 7k2 7k2 7n2 7n2 7n2 7n2 7n2 8pq

Runs: 100000
Upgraded spin: Yes

Cards won: 67720
Cards per game: 0.677
Droprate (%): 48.658

Extra electrum won: 83085551
Extra electrum per game: 830.86

Card
Won (total)
% of all cards won
Won (per game)
Burning Tower1700.250.002
Explosion2182032.220.218
Light Tower10821.600.011
Morning Glory2234933.000.223
Improved Miracle65479.670.065
Animate Weapon1575223.260.158
Title: Re: Elements Slot Machine Simulator
Post by: Jangoo on September 29, 2011, 02:16:00 pm


So, what is droprate?

 
Title: Re: Elements Slot Machine Simulator
Post by: Xenocidius on September 29, 2011, 02:21:34 pm
Droprate is the percentage of games in which you win at least one card.
Title: Re: Elements Slot Machine Simulator
Post by: rosutosefi on September 29, 2011, 02:43:52 pm
Droprate is the percentage of games in which you win at least one card.
Erm, no. Droprate if the number of cards won divided by the number of games won, which also includes two-card and three-card wins. Same as what Darkweaver used.
Title: Re: Elements Slot Machine Simulator
Post by: Xenocidius on September 29, 2011, 02:57:40 pm
Erm, no. Droprate if the number of cards won divided by the number of games won, which also includes two-card and three-card wins. Same as what Darkweaver used.
Well, my program calculates droprate as what I said previously, in lieu of a better word.
Title: Re: Elements Slot Machine Simulator
Post by: rosutosefi on September 29, 2011, 03:04:53 pm
Erm, no. Droprate if the number of cards won divided by the number of games won, which also includes two-card and three-card wins. Same as what Darkweaver used.
Well, my program calculates droprate as what I said previously, in lieu of a better word.
But that means the probability of winning exactly 2 cards is multiplied by 2, and the probability of winning 3 is multiplied by 3. These are then added to the probability of winning exactly 1, so it's not the probability of winning at least one card. :)
Title: Re: Elements Slot Machine Simulator
Post by: Xenocidius on September 29, 2011, 03:12:58 pm
Pardon?

If you're suggesting the simulator calculates chance to win at least 1 card wrongly, then you would be mistaken.

Why: It checks each time to see whether it has won at least one card and if so adds to the variable containing that. I highly doubt it is wrong.
Title: Re: Elements Slot Machine Simulator
Post by: rosutosefi on September 30, 2011, 11:37:36 am
But it checks once every spin, for 3 spins, so if it wins 3 cards from a game then it adds three to the counter. It does not only calculate the chance of winning at least a card from the game, but it also takes into consideration the weight of two-card wins and three-card wins. So it's not "at least one card".

But this statistic is more useful, so meh, no point in arguing about it.  :))
Title: Re: Elements Slot Machine Simulator
Post by: Xenocidius on September 30, 2011, 12:16:56 pm
Here's how it works:

Repeat 3 times:
*blah blah*
if a card was won, set won to true

At the end:
if won = true, drop += 1.

But anyway, Dark Weaver has informed me of a slight error in the code which makes the value of droprate somewhat inaccurate without a huge number of runs.

Since fixing it would slow it down even more, I've casually removed droprate. Enjoy the new faster speed. :)
Title: Re: Elements Slot Machine Simulator
Post by: rosutosefi on September 30, 2011, 12:24:20 pm
So it's not like your original version? I ish coonfused.  ???
Title: Re: Elements Slot Machine Simulator
Post by: Djhopper :) on October 02, 2011, 03:16:59 pm
Link is broken :(
Title: Re: Elements Slot Machine Simulator
Post by: Xenocidius on October 02, 2011, 03:31:16 pm
Link is broken :(
Sorry about that, fixed.
Title: Re: Elements Slot Machine Simulator
Post by: Djhopper :) on October 02, 2011, 06:22:17 pm
Link is broken :(
Sorry about that, fixed.
Title: Re: Elements Slot Machine Simulator
Post by: OdinVanguard on December 12, 2013, 09:23:14 pm
Totally awesome tool. Will be very useful in designing NPC for the upcoming EtG release. I would highly suggest that those serious about making good npc to help newbies grind should use this to get an idea for what their creations' grind precentages will be.

I also really like the opening hand simulator too. It should prove very useful in fine tuning NPC draw rates as well.
Title: Re: Elements Slot Machine Simulator
Post by: theelkspeaks on February 18, 2014, 03:37:15 am
Has this been moved to another site?
blarg: Bhlewos,Xenocidius