*Author

Offline eaglgenes101

  • Hero Member
  • *****
  • Posts: 1964
  • Country: us
  • Reputation Power: 29
  • eaglgenes101 is a proud Wyrm taking wing for the first time.eaglgenes101 is a proud Wyrm taking wing for the first time.eaglgenes101 is a proud Wyrm taking wing for the first time.eaglgenes101 is a proud Wyrm taking wing for the first time.eaglgenes101 is a proud Wyrm taking wing for the first time.
  • The rising all-'rounder of Elements
  • Awards: Slice of Elements 6th Birthday CakeSlice of Elements 5th Birthday CakeSlice of Elements 4th Birthday Cake
Re: The Return of FGei (for v1.32x) https://elementscommunity.org/forum/index.php?topic=49887.msg1094964#msg1094964
« Reply #108 on: August 28, 2013, 04:34:51 am »
I meant 5 cards as in 5 cards chosen randomly from the deck played.
Any more corrections?
My 3 game-modification principles:
1. If it ain't broke, don't wreck it.
2. Simple fixes for simple problems.
3. Remember to fill in the holes.

Offline ColorlessGreen

  • Sr. Member
  • ****
  • Posts: 774
  • Reputation Power: 14
  • ColorlessGreen is taking their first peeks out of the Antlion's burrow.ColorlessGreen is taking their first peeks out of the Antlion's burrow.
  • Awards: Slice of Elements 5th Birthday CakeSlice of Elements 4th Birthday Cake
Re: The Return of FGei (for v1.32x) https://elementscommunity.org/forum/index.php?topic=49887.msg1094967#msg1094967
« Reply #109 on: August 28, 2013, 05:04:11 am »
IIRC, 5 cards are chosen but only 4 are actually included in the spins (i.e. the 5th is chosen for no reason).

There's a post somewhere that explains the entire algorithm in full detail. If nobody manages to dig it up before I get around to it I'll link it at some point.

Offline PellaTopic starter

  • Sr. Member
  • ****
  • Posts: 813
  • Country: ca
  • Reputation Power: 11
  • Pella is taking their first peeks out of the Antlion's burrow.Pella is taking their first peeks out of the Antlion's burrow.
  • Keeper of Statistics & Picker of Nits
  • Awards: Slice of Elements 4th Birthday Cake
Re: The Return of FGei (for v1.32x) https://elementscommunity.org/forum/index.php?topic=49887.msg1094969#msg1094969
« Reply #110 on: August 28, 2013, 05:12:13 am »
And for exact calculations, let's go over the process: (Someone correct mistakes if I make them, please)
So the AI picks 5 cards. If it is a pillar card, then it randomly repicks that card, unless it already tried to repick that card 10 times, in which the 10th repick automatically becomes the pick.
And then it runs slot machine on those 5 cards.

Correct?
Short answer:  No.

Long answer:  Once upon a time, Evil Hamster posted this, in which he provided this link, which is Zanzarino telling the world essentially just what you said.  In 2009.  At the end of it, he wrote that he was making a change.

In 2011, Dark Weaver posted this, in which he revealed a completely different method for selecting the cards on the reels.

Ultimately, it is possible that both are true.  The 2009 post could be creating what some call a "shortlist" of 5 cards, and the 2011 post tells what happens once you have the 5 cards.  However, the 2011 post gives me the impression that it selects cards at random from the deck instead of from a shortlist.  Xenocidius may have a better answer.  I do not.
War 7, Team Death
(Honourary Member, Mascot)

Offline Leodip

  • Sr. Member
  • ****
  • Posts: 786
  • Country: it
  • Reputation Power: 11
  • Leodip is taking their first peeks out of the Antlion's burrow.Leodip is taking their first peeks out of the Antlion's burrow.
  • Go home Homura, you're drunk.
  • Awards: Slice of Elements 5th Birthday CakeSlice of Elements 4th Birthday Cake
Re: The Return of FGei (for v1.32x) https://elementscommunity.org/forum/index.php?topic=49887.msg1095003#msg1095003
« Reply #111 on: August 28, 2013, 01:23:22 pm »
And for exact calculations, let's go over the process: (Someone correct mistakes if I make them, please)
So the AI picks 5 cards. If it is a pillar card, then it randomly repicks that card, unless it already tried to repick that card 10 times, in which the 10th repick automatically becomes the pick.
And then it runs slot machine on those 5 cards.

Correct?
Short answer:  No.

Long answer:  Once upon a time, Evil Hamster posted this, in which he provided this link, which is Zanzarino telling the world essentially just what you said.  In 2009.  At the end of it, he wrote that he was making a change.

In 2011, Dark Weaver posted this, in which he revealed a completely different method for selecting the cards on the reels.

Ultimately, it is possible that both are true.  The 2009 post could be creating what some call a "shortlist" of 5 cards, and the 2011 post tells what happens once you have the 5 cards.  However, the 2011 post gives me the impression that it selects cards at random from the deck instead of from a shortlist.  Xenocidius may have a better answer.  I do not.
I'm not really confident with programming, so I didn't really understand Weaver's post. Could someone (Pella most likely) explain it to me with a step by step, if possible?

Offline ColorlessGreen

  • Sr. Member
  • ****
  • Posts: 774
  • Reputation Power: 14
  • ColorlessGreen is taking their first peeks out of the Antlion's burrow.ColorlessGreen is taking their first peeks out of the Antlion's burrow.
  • Awards: Slice of Elements 5th Birthday CakeSlice of Elements 4th Birthday Cake
Re: The Return of FGei (for v1.32x) https://elementscommunity.org/forum/index.php?topic=49887.msg1095066#msg1095066
« Reply #112 on: August 28, 2013, 10:52:07 pm »
And for exact calculations, let's go over the process: (Someone correct mistakes if I make them, please)
So the AI picks 5 cards. If it is a pillar card, then it randomly repicks that card, unless it already tried to repick that card 10 times, in which the 10th repick automatically becomes the pick.
And then it runs slot machine on those 5 cards.

Correct?
Short answer:  No.

Long answer:  Once upon a time, Evil Hamster posted this, in which he provided this link, which is Zanzarino telling the world essentially just what you said.  In 2009.  At the end of it, he wrote that he was making a change.

In 2011, Dark Weaver posted this, in which he revealed a completely different method for selecting the cards on the reels.

Ultimately, it is possible that both are true.  The 2009 post could be creating what some call a "shortlist" of 5 cards, and the 2011 post tells what happens once you have the 5 cards.  However, the 2011 post gives me the impression that it selects cards at random from the deck instead of from a shortlist.  Xenocidius may have a better answer.  I do not.

Those are not two different methods of picking cards. The later one is a clarification of the first one. What it basically says is that the 10 pillar rerolls are 10 total rerolls, not 10 rerolls per picked card. In other words, you're still picking a shortlist of cards from the deck which the slots spin from, and you're still rerolling pillars, but your number of pillar rerolls count for all of the attempts to pick a shortlist rather than being a new set of rerolls for each card in the shortlist.

edit: Actually, darkweaver's 2011 post technically is replacing the previous one, since it does describe the whole process, but it's still only just clarifying the way the previous one worked.
« Last Edit: August 28, 2013, 11:02:39 pm by ColorlessGreen »

Offline PellaTopic starter

  • Sr. Member
  • ****
  • Posts: 813
  • Country: ca
  • Reputation Power: 11
  • Pella is taking their first peeks out of the Antlion's burrow.Pella is taking their first peeks out of the Antlion's burrow.
  • Keeper of Statistics & Picker of Nits
  • Awards: Slice of Elements 4th Birthday Cake
Re: The Return of FGei (for v1.32x) https://elementscommunity.org/forum/index.php?topic=49887.msg1095089#msg1095089
« Reply #113 on: August 29, 2013, 02:21:40 am »
Given enough time, I probably could beat a spreadsheet into submission well enough for it to do the math we're seeking.  Obviously, I must have an EXACT procedure before I can do this.  We have a large amount of information about this process.  Unfortunately, we don't have all of the information.  Please bear with me while I explain competely.

In his first post on the subject, Dark Weaver wrote:
The slot machine works with 3 reels, each reel is composed of 4 cards (not necessarily different), reels are the same.Each try uses a different set of 4 cards.You wont get upgraded cards unless you play against the FG or the Half Blood.There are cards you cannot win, you'll get a relic instead.Quantum tower is fixed (its considered a tower/pillar).I've seen nowhere a 10% thing related to shards.(would have done the calculus more interesting :) )
Summary of relevant information:
- Each reel contains 4 cards.  Duplication is allowed.
- All three reels are identical.
- Each new spin gets new reels.


After he discovered an error in his interpretation of the source code, Dark Weaver posted a sort of-plain English version of the code that selects the cards.  I have inserted carriage returns in the appropriate places to make his post more readable.
Reel creation process:
1. (init) loop:=0, ncard:=0
2. C:=random card from deck, loop:=loop+1
3. if loop > 8 goto step 5.
4. if C is a tower/pillar goto step 2.
5. ncard:=ncard+1(error)5bis. loop:=0 (error)
6. if C is upped and lvl is not 5 or 6 then C:= downgrade version of C
7. if C is a banned card then C:= relic (upped one if C is still upped)
8. if ncard <= 4 goto step 2.
9. the 4 first cards = the reel
In plain(er) English:
1. Create two objects to count different things.  Name them "loop" and "ncard".  Give each an initial value of zero.
2. Choose a random card from the deck, and call it "C".  Add 1 to "loop" counter.
3. If "loop" is greater than 8, skip to step 5.  [Implied:  If "loop" is less than 8, continue to step 4.]
4. If "C" is a Pillar or Tower, return to step 2.  [Implied:  If "C" is neither a Pillar nor a Tower (this probably also includes Pendulums), continue to step 5.]
5. Add "C" to the reel.  Add 1 to "ncard" counter. *
6. If "C" is upped, and the opponent is lower than AI4, replace "C" with its unupped version.
7. If "C" is a Nymph or Mark, replace "C" with a Relic (upped or unupped, as appropriate).
8. If "ncard" is less than or equal to 4, return to step 2. **
9. You now have a reel with 5 cards.  Throw away the fifth card on the reel.  Using the first four cards, create three identical reels.  Put all three reels in the virtual slot machine.

* This part is a little confusing.  Based on everything else Dark Weaver wrote, including his mention of making an error by resetting the loop counter (which "loop:=0" does), this is my best guess.

** This part is extra confusing.  After the fourth card is selected for the reel, "ncard" = 4.  This line orders the computer to run through the loop again and select a fifth card, which is never used.  Maybe it's an error on Zanzarino's part, or maybe some oddity in the programming language requires it for things to work as intended.  I have no idea.  However, it really doesn't matter to the probabilities, since the computer always uses the first four cards for the reel.  Selecting a fifth card is just something to keep the computer busy, for all I can tell.  ;)


After all of this, the spin happens.  Each card has a 25% chance to appear on each reel.  The chance of all three reels showing the same card is 25% x 25% x 25% = 1.5625%.  If each reel has two or more copies of a particular card, this probability increases.


Now, there's another element to this, and it has a very real impact on the numbers.  In Statistics, we talk about making choices "with replacement" and "without replacement".  "Replacement" means, "After you select a card at random, put it back in the deck so you have a chance to select exactly the same card again."

Replacement, or lack thereof, has a small but noticeable effect on non-pillar cards.  On pillar cards, though, the effect would be much larger, since pillar cards are thrown out and replaced the first 9 times they are selected for any given reel.  If the selection is without replacement, that would reduce dramatically the chance for a pillar card to be on the reel.

Someone in the thread asked Dark Weaver whether the selection is with or without replacement.  He never answered that question.  He never even stated which method he used for his calculations.  His line 2 of the code, "C:=random card from deck", implies that selection is with replacement.  His next paragraph ends with the word, "discarded", which implies that selection is without replacement.  Using the given information, it is impossible to know for certain which method he used.  Furthermore, the given information makes it impossible to know which method the game uses.


As if all of that were not enough, Xenocidius then posted this in the same thread:
The problem is that we don't really know for sure the algorithm used to select cards in the spinner. We have one, but it may be outdated. If we had the algorithm we could calculate the probabilities exactly.
Xenocidius can pull apart the code as well as anyone, and better than most.  He had doubts two years ago about the accuracy of the algorithm that Dark Weaver assembled.  I've found no posts by Xenocidius after that date that relieve any of the doubts.


TL; DR - I have enough information, spreadsheet skills, and (eventually) time to calculate drop rate probabilities for all the FGs.  I have insufficient information to guarantee that said calculations will be correct--that is, will match the actual probabilities within the game.

Edit:  Fixed quote references.
« Last Edit: August 29, 2013, 02:32:08 am by Pella »
War 7, Team Death
(Honourary Member, Mascot)

Offline eaglgenes101

  • Hero Member
  • *****
  • Posts: 1964
  • Country: us
  • Reputation Power: 29
  • eaglgenes101 is a proud Wyrm taking wing for the first time.eaglgenes101 is a proud Wyrm taking wing for the first time.eaglgenes101 is a proud Wyrm taking wing for the first time.eaglgenes101 is a proud Wyrm taking wing for the first time.eaglgenes101 is a proud Wyrm taking wing for the first time.
  • The rising all-'rounder of Elements
  • Awards: Slice of Elements 6th Birthday CakeSlice of Elements 5th Birthday CakeSlice of Elements 4th Birthday Cake
Re: The Return of FGei (for v1.32x) https://elementscommunity.org/forum/index.php?topic=49887.msg1095090#msg1095090
« Reply #114 on: August 29, 2013, 02:26:54 am »
Not to worry. We have the spin simulator to do an empirical check on the calculations.
*Sets simulator to do 10 million spins*
*Crashes browser*
My 3 game-modification principles:
1. If it ain't broke, don't wreck it.
2. Simple fixes for simple problems.
3. Remember to fill in the holes.

Offline PellaTopic starter

  • Sr. Member
  • ****
  • Posts: 813
  • Country: ca
  • Reputation Power: 11
  • Pella is taking their first peeks out of the Antlion's burrow.Pella is taking their first peeks out of the Antlion's burrow.
  • Keeper of Statistics & Picker of Nits
  • Awards: Slice of Elements 4th Birthday Cake
Re: The Return of FGei (for v1.32x) https://elementscommunity.org/forum/index.php?topic=49887.msg1095091#msg1095091
« Reply #115 on: August 29, 2013, 02:30:52 am »
Not to worry. We have the spin simulator to do an empirical check on the calculations.
*Sets simulator to do 10 million spins*
*Crashes browser*
My browser can do it.  My browser already did it yesterday.  Three times.
Here's the catch:  The spin simulator is based on the work that Dark Weaver did.  As my entirely-too-long post immediately above indicates, no one, including the creator of the spin simulator, is certain that its results correspond to actual in-game results.

Edit:  This is my post #750.  Yay, me!  :D
« Last Edit: August 29, 2013, 02:33:00 am by Pella »
War 7, Team Death
(Honourary Member, Mascot)

Offline Leodip

  • Sr. Member
  • ****
  • Posts: 786
  • Country: it
  • Reputation Power: 11
  • Leodip is taking their first peeks out of the Antlion's burrow.Leodip is taking their first peeks out of the Antlion's burrow.
  • Go home Homura, you're drunk.
  • Awards: Slice of Elements 5th Birthday CakeSlice of Elements 4th Birthday Cake
Re: The Return of FGei (for v1.32x) https://elementscommunity.org/forum/index.php?topic=49887.msg1095117#msg1095117
« Reply #116 on: August 29, 2013, 08:36:33 am »
Ok, then, it could be simplified into:
1.Create ncard=0 and loop=0;
2.Pick a card;
3.If loop<8 and if the card is a pillar (including towers and pendulums), go back at 2 and do loop+1;
4.If the card is a nymph or a mark, replace with relic;
5.Store the card in a variable and do ncard+1
6.If ncard<4, go back at 2.

If it is like this, it won't discard anything, so that, if you have only one purify in your deck, it is possible to have it in a reel 4 times.
If the code really is like this, it isn't even that hard to calculate the probabilities of a card.
A question, if anyone knows, does the 8-respins mechanism reset with each reel? I believe it does, but I didn't read anything.


Offline ColorlessGreen

  • Sr. Member
  • ****
  • Posts: 774
  • Reputation Power: 14
  • ColorlessGreen is taking their first peeks out of the Antlion's burrow.ColorlessGreen is taking their first peeks out of the Antlion's burrow.
  • Awards: Slice of Elements 5th Birthday CakeSlice of Elements 4th Birthday Cake
Re: The Return of FGei (for v1.32x) https://elementscommunity.org/forum/index.php?topic=49887.msg1095142#msg1095142
« Reply #117 on: August 29, 2013, 03:21:10 pm »
A question, if anyone knows, does the 8-respins mechanism reset with each reel? I believe it does, but I didn't read anything.

According to my interpretation of darkweaver's post on the subject, the respins reset for each new spin. The respins do not reset while choosing the shortlist for a particular spin, but after that shortlist is chosen and spun, the next spin creates a new shortlist with a new set of respins.


With regards to how much we can trust the algorithms and xenosim and whatnot, my personal opinion on the subject is that we should basically trust the algorithms and the xenosim until we have reason not to. I am not holding my breath about zanz jumping in here and posting (or reposting as the case may be) the current code, and that's pretty much the only way we're going to be 100% certain.

Aside from that, the best mechanism we have for determining the accuracy is to play games and record the results and see how they match up with the tests. This is a very long process, as Pella had mentioned, since we are talking about thousands of wins (and honestly to get good precision, we're probably talking about more like tens of thousands or more). Between now and completing enough wins to be able to verify the results of the test to any decent degree of accuracy, we can either trust what we have or throw away what we have. If we trust what we have, we go forward using the same methods that have been in use for years (and generally accepted as accurate, and which match up pretty closely to actual recorded results in the past.) If we do not trust what we have, we have essentially nothing but guesswork.

So if anyone has any good ideas on how to convince zanz (or someone else with access, if there is anyone else) to post the current code for the spin algorithm, that would be fantastic. Aside from that, my personal vote is that we assume xenosim is accurate and continue forward with the studies as we have for years, and as our sample size grows compare the empirical results to the xenosim results.

Offline PellaTopic starter

  • Sr. Member
  • ****
  • Posts: 813
  • Country: ca
  • Reputation Power: 11
  • Pella is taking their first peeks out of the Antlion's burrow.Pella is taking their first peeks out of the Antlion's burrow.
  • Keeper of Statistics & Picker of Nits
  • Awards: Slice of Elements 4th Birthday Cake
Re: The Return of FGei (for v1.32x) https://elementscommunity.org/forum/index.php?topic=49887.msg1095271#msg1095271
« Reply #118 on: August 30, 2013, 04:55:47 am »
A question, if anyone knows, does the 8-respins mechanism reset with each reel? I believe it does, but I didn't read anything.

- Each reel contains 4 cards.  Duplication is allowed.
- All three reels are identical.
- Each new spin gets new reels.

Yes, it resets the "loop" counter every time it creates a new reel.
No, it does not reset the counter for the 2nd and 3rd reels in one spin, because those reels are created by duplicating the 1st reel instead of being calculated separately.


Aside from that, the best mechanism we have for determining the accuracy is to play games and record the results and see how they match up with the tests. This is a very long process, as Pella had mentioned, since we are talking about thousands of wins (and honestly to get good precision, we're probably talking about more like tens of thousands or more).
Yes, it will take huge numbers of spins to verify the accuracy of the calculations, simply because the results per card are such small numbers (in some case, with a few zeroes after the decimal point before the significant digits).  The commonly accepted number of spins to use in the XenoSimâ„¢ to ensure accuracy is 10 million.  I'm willing to run even more with my computer.

Given that information, will 10,000 or 50,000 empirical spins be enough to verify the accuracy of the XenoSimâ„¢ algorithm?  Maybe.  Maybe not.  Only doing the study will provide the answer to that question.  We've already started FGei testing on 1.32, obviously, and we're going to continue doing it.  What we don't know yet is exactly what will change with v1.4, or to what degree they will change.  It appears clear, though, that things will change.  Because of that, I'm apprehensive about starting anything new at this point.  Let's just keep doing what we're doing until v1.4 arrives, and then we can evaluate the new landscape to see where to go next.

TL; DR - Pella's plan of action:
1) Run very large numbers of XenoSimâ„¢ spins for Akebono and Osiris.
2) Modify the GDocs spreadsheet to calculate individual FGei(c)'s for each FG, then calculate each deck's FGei(cn).
3) Add a feature to the GDocs spreadsheet that collects empirical spin rate data from all decks and displays it for comparison with the theoretical rates.

That's really all we can do right now, isn't it?
War 7, Team Death
(Honourary Member, Mascot)

Offline PellaTopic starter

  • Sr. Member
  • ****
  • Posts: 813
  • Country: ca
  • Reputation Power: 11
  • Pella is taking their first peeks out of the Antlion's burrow.Pella is taking their first peeks out of the Antlion's burrow.
  • Keeper of Statistics & Picker of Nits
  • Awards: Slice of Elements 4th Birthday Cake
Re: The Return of FGei (for v1.32x) https://elementscommunity.org/forum/index.php?topic=49887.msg1095576#msg1095576
« Reply #119 on: September 01, 2013, 02:11:13 am »
In the final version false gods will appear in rare occasions and randomly on the map in areas level 60 or higher.
The Oracle will also find one for you once every day and mark its location on the map.
To approach a false god it is necessary to defeat at least one of their minions, any damage taken while in a false god lair will be permanent: next duel does not start at hpmax. (does not happen in the trainer yet)
This.

When v1.4 arrives, FGei will be a thing of the past.  Over.  Done.  Useless.  Kaput.

The only reason FGei works is because both you and the FG have a known, consistent starting point.  Under the new system that Zanzarino wants to implement, the player's starting point will be variable.  Therefore, FGei will be impossible to calculate.

Enjoy it while it lasts, boys and girls, 'cuz it's goin' away!!
War 7, Team Death
(Honourary Member, Mascot)

 

blarg: Xenocidius,Zanzarino