Guest Posts

This section allows you to view all posts made by a guest. Note that you can only see posts made in areas you currently have access to.


Messages - chriskang (283)

Pages: 1 ... 21 22 [23] 24
265
General Discussion / Best rare win story
« on: December 15, 2009, 10:10:04 pm »

This is the general algorithm for all card spins: level 1, 2, 3, 6, pvp and t50. There is no special treatment for level 1.
It just confirms what we already know:
- chances to win a card from a 50 cards deck are actually much higher than 1/2500 thanks to the "4 card shortlisting" mechanism described above (if would be 1/2500 if every pick was random)
- chances to win a card increase a lot for cards that are present multiple times in the deck

As level 1 deck is mostly composed of unique cards (just 1 or 2 copies of each card is present inside the deck), then the chances to actually win something are far lower than, say, a fake god.
If you compare the first table on those 2 pages:
http://elementsthegame.wikia.com/wiki/Scorpio
http://elementsthegame.wikia.com/wiki/Fire_Queen
You'll see that Scorpio, who has a wide range of different cards (16), lets you win only 32% of the times. Whereas with Fire Queen, who has 8 different cards, your chances to win are much higher (46%).

My second percentage (10%) was an estimation of what the win rate would be for a deck composed of about 35 different cards. This is not the result of a real simulation, just a guess from me, seeing the progression of the 2 fake gods above:
8 different cards --> 46% chance to win
16 different cards --> 32% chance to win
25 different cards --> probably something around 20%
35 different cards --> probably something around 10%

Now the third percentage (1%) comes from the fact that cards present in multiple copies have much higher chances to be present in the "4 card shortlist" and therefore to be finally chosen. Look at scorpio again:
- cards that are present 1 time inside the deck have a 1.9% chance to be won
- cards that are present 2 times have a 4.7% chance to be won which is more than twice the previous number (4.7 = 1.9 + 2.8)
- cards that are present 3 times have a 8.5% chance to be won which represents an even bigger increase than above (8.5 = 1.9 + 2.8 + 3.8)
and so on, till the end.

On a typical level 1 deck, most cards will be present just 1 time but some will probably be more present than that (because, well, random is random). And those are the ones that will make the chances to get a pulv go down drastically.
My guess is that the table for a level 1 deck will look something like this :
- random card present 3 times inside the deck --> 25%
- other card with 3 copies --> 25%
- card present 2 times --> 6%
- other card with 2 copies --> 6%
- other card with 2 copies --> 6%
- other card with 2 copies --> 6%
- unique card --> 0.7%
- and so on for the 33 other unique cards --> 0.7%

Your next argument will probably be "ok, but what if the pulv is the card that has 2 or 3 copies". And I'll answer that this case is so rare that it won't actually change the overall statistics. After an infinite number of fight against level 1, the percentages will be equally distributed between all existing cards (about 136), not just the 47 of a single given deck.

266
General Discussion / Mutations
« on: December 15, 2009, 10:10:04 pm »

I don't understand the percentages at all. Why are there numbers there with commas?
There are commas there because not everyone is American. :P
They're decimal separators (http://en.wikipedia.org/wiki/Decimal_separator), and those of us who use commas in our native tongue sometimes get them mixed up when writing in English.
I know I do, at least... I guess chris does as well.
Fixed.
Thanks for letting me know.

267
General Discussion / Best rare win story
« on: December 15, 2009, 10:10:03 pm »

Today's your lucky day :)
Level 1 deck is composed of about 13/14 pillars of various types and 47/48 other cards chosen randomly between all non upgraded cards (including rares).
So basically, the chances for a pulv to be in this deck are about 35%.
Then, as it is a very mixed build, your chances to win something during the (unique) spin must be somewhere near 10%
And the chances for this card to be a pulv (and not another one from its deck) are clearly far below 1%.

Do the math, you've seen something that happens far less than 1 time out of 3000.
This is your very lucky day.

268
Game Suggestions and Feedback / AI code - Zanzarino please read this!
« on: December 15, 2009, 10:10:03 pm »

Anyone want to lay odds that he's done playing with Elements?  Like, he gets decent ad revenue but now he wants to build that first person shooter he's always dreamed of or something?  It's just a flash game, after all.  Most people put them up and never bother to update again.  He doesn't seem to be much interested in it anymore.
This is precisely my fear.
He gave no signs of life for the last 2 months or so (or if he did, I'm not aware of that). Seeing how much projects he currently has (http://www.zanzarino.net/) he might have very few time for each of them.
I really hope we're mistaken but just as you Archduke, I'm preparing for the worst.

I could understand easily an announcement saying that he quits the development because he lacks time to code. This day, if he allows some people to continue working on the project, I'll be in line (with many others, I'm sure) to join the new dev team. I just hope he won't let the game die slowly without touching it.


269
Game Suggestions and Feedback / AI code - Zanzarino please read this!
« on: December 15, 2009, 10:10:03 pm »

Now that the trick is revealed, I think I have to give an explanation here before someone asks "how do you decompile a swf".

So yes, I used a decompiler to look at the source code and to extract some pieces of information from it that weren't well known (drop rates, mutation effect, AI algorithm, ...)
Inside the source code, I spotted half a dozen bugs that I wrote in the wiki page and I also found a few major security holes. Chances are high that those holes are the ones abused by cheaters to get a score in t50 ten minutes after their account creation.
I wrote to Zanzarino immediatly to offer my help in solving those issues. But for now, I got no answer.

So I ask everyone who has some knowledge in engineering NOT TO give advices on how to decompile and how to read an actionscript code until those problems are fixed.
I hope you understand that having a "cheater free" game is more important than anything else.



270
General Discussion / Mutations
« on: December 15, 2009, 10:10:03 pm »

It's still lacking some details on how the random selections happen, but as nothing is specified I assume they're independent and uniform. Here's hoping chris corrects me if I'm wrong.
You're correct. Each one of the 56 creatures has the same chance to be chosen (for some reasons Scarab, Devonian Dragon and Immortal are excluded).
Same for skill, attack boost, life boost, and skill cost.


I've NEVER seen a Gnome that didn't have poison or burrow, a spark that didn't have ablaze, deja vu, or steal, etc.


You probably don't have played enough to see all combinations.
Yet, you might be partially right. I spotted a piece of code that might involve a flaw in the random() procedure. I'll investigate on that soon.



271
General Discussion / Mutations
« on: December 15, 2009, 10:10:03 pm »

There's definitely a flaw here.
Let me try an explanation and again, forgive my frenglish.

So the game has 2 ways to pick up a random number:
- the first way is a native method of Actionscript called "Math.random()". If you're interested, see this:
http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary466.html
This one should always work fine and give accurate (pseudo)random numbers.
- the second method consists in taking the number from a pool build by Zanzarino. That's the one used by the "mutation" code.

Here's the detailed algorithm of the second method:
- function newseed() picks up 200 random number (by calling Math.random()) between 0 and 9 and concatenates them in a string of size 200.
- function rand() has an internal counter called "nnn" that is increased by 1 each time the function is called and reset to 0 when it reaches 197. This function returns the substring (of size 4) from the previous 200 characters string, starting at position "nnn" and divided by 10000 to produce a number between 0 and 1.
This is probably quite hard to understand so here's an example:
Let's say the first function produces the string "12345678901234 ... 67890" (size 200)
Then the first call to rand() will return 0.1234 (first 4 characters divided by 10000)
The second call will return 0.2345 (4 characters starting at the next position in the long string)
Then 0.3456 and so on.

Obviously, there is a strong correlation between 2 consecutive numbers picked by rand().
And there is more: for unknown reasons, the function newseed() that produces the 200 characters string is only called at the launch of the game (and when I say "launch" I mean before the login screen, not each time you start a new battle).
So, while you don't refresh the page in your internet browser (and retype your login name/password), you'll keep on getting the same 197 numbers over and over again.
This is exactly why the odds to see the same exact creature on the battlefield are so high (1 out of 197 if you just mutate 1 creature, much more if you mutate more).

The second problem (only 197 different "random" numbers) looks to me like the most serious one. Pick up a pen and paper, mutate like hell, write down the stats of all the different creatures you get, and when your list counts 197 mutants you can be sure that all the next mutations will produce a mutant from the list. And if you don't reload the swf, you'll stick with this list forever.
The impact of the first problem (correlation between 2 consecutive call) is harder to evaluate as it is very hard for me to know what calls are consecutive without the original source code from Zanzarino. I spotted a link between mutant skill and life bonus as I'm sure those are consecutive:
if (mutant skill is hatch, burrow, steal, heal, paradox, scavenger, gravity pull, mutation, ablaze or deja vu) then life bonus is between 0 and 2, with higher chances to be 0 or 1.
if (mutant skill is freeze, destroy, dive, momentum, lycanthropy, infection, devour, growth, poison or immaterial) then life bonus is between 2 and 4, with higher chances to be 3 or 4.
As for a link between creature's appearance and skill, I'm not able to give you an answer, as I don't know if those calls are consecutive or not. PuppyChow said that he saw sparks with ablaze, deja vu and steal and I provided screenshots of other sparks with poison, immaterial and momentum. Without more evidence, I'll just suppose there is no link here.



272
General Discussion / Mutations
« on: December 15, 2009, 10:10:03 pm »

Gnome with DejaVu
& Spark with Immaterial :
http://img62.imageshack.us/gal.php?g=gnomedejavu.jpg

273
False Gods / Loot rate
« on: December 15, 2009, 10:10:02 pm »

Thanks mate
I wish I wasn't the only contributor...  ::)

275
False Gods / Loot rate
« on: December 15, 2009, 10:10:02 pm »

Well, Mr Chriskang, I truly appreciate your work on this.  It seems as though you have a lot to offer this community.  Many of us are very anxious to get a better idea of how the AI makes decisions and prioritizes its actions.  Do you think you could start helping us with some explanations of that as well?  No worries about the language, either, you seem quite competent.
Actually, I've got a work in progress on AI too. This is far from being finished but if you're interested, you can take a look at my draft here:
http://elementsthegame.wikia.com/wiki/User:Chriskang/Sandbox/10

276
False Gods / Loot rate
« on: December 15, 2009, 10:10:02 pm »

Very nice!!!
Any chance you could also do this for AI3 ?!
The decks are already here:
http://elementsthegame.wikia.com/wiki/AI3

Do you want drop rates too?

Pages: 1 ... 21 22 [23] 24
anything
blarg: