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 ... 20 21 [22] 23 24
253
Issue Archive / Random Number Generator
« on: December 15, 2009, 10:10:05 pm »

In all the code, there are 43 calls to the (good) actionscript random and 53 to Zanzarino's rand()

Deck shuffling uses the Fisher–Yates algorithm with actionscript random.
Wikipedia says it's a good idea:
http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle

Spinners use Math.random() from actionscript too, so no problem there either.

After a quick check, Zanzarino's (flawed) rand() is used by:
* mutations (creature's appearance, skill, skill cost, attack & life bonus)
* chances to freeze target with Ice Bolt/Ice Shield
* quantums gained with Quantum Pillars/Towers
* quantums lost with Dissipation Field
* quantums absorbed by Devourers
* quantums changed by Scramble effect
* effect from Chaos Seed/Chaos Power
* chances to miss with Fog Shield/Dusk Mantle



255
Off-Topic Discussions / Question about the technical
« on: December 15, 2009, 10:10:05 pm »

The client (swf) is created with Flash 8.0 and counts about 15000 lines of code (all in actionscript).
The data persistence part is handled by a MySQL database but, as MySQL cannot be accessed directly by actionscript, Zanzarino had to create some wrappers to link both worlds.
Those wrappers are written in PHP. The client simply calls them with an HTTP POST and reads the result in plain text.

AI decks are all loaded at startup and while you play AI1, AI2, AI3 or FG, the only communication with the database is to store your score.
For t50, the game asks MochiAd for the list of the 50 top players, then randomly picks one, and finally retrieves the deck of this player from Zanzarino's database. Once the deck is loaded, there's no more communication with the server.
The hardest part is pvp/duel:
After each "end turn" from your side, your client sends the current game state to the server which stores it into the database and somehow transmits it to the other player.
I'm not 100% sure here, but I think the "standby" client just keeps asking for some news every second or so, until it gets a positive response from the server.


256
General Discussion / You can't Protect Artifact then fly :(
« on: December 15, 2009, 10:10:05 pm »

why is this useful?
Just check the bazaar ;)

257
General Discussion / You can't Protect Artifact then fly :(
« on: December 15, 2009, 10:10:05 pm »

So we can test decks with any card, including miracle, squid, and both shards.
Well, this thread was about mark cards but regular rare cards are in there too, yes.
I can change the starter decks quite easily too, would it interest someone? What build should I put?

258
General Discussion / You can't Protect Artifact then fly :(
« on: December 15, 2009, 10:10:05 pm »

259
General Discussion / Slot wheel mysteries revealed (finally!)
« on: December 15, 2009, 10:10:05 pm »
I wish I had seen this before... I wouldn't have explained everything again here (http://elementscommunity.org/forum/index.php/topic,712.msg7409#msg7409).

A few comments though:

* The first part of the algorithm creates what I call a "shortlist" of 5 cards, but only the first 4 are actually used afterwards (and that's what really counts). So the chances to get something are higher than what Zanzarino says. I don't know if it's bug or not, but that's how it works.

* The mechanism to prevent infinite loops described at the end of the post, doesn't stop searching for non-pillar cards after 50 failed attempts but after 10. That makes the risks to get a pillar from the spinning wheel much higher for builds that have about 50% pillars (or more). Also, only elemental pillars, elemental towers and quantum pillars are excluded. For some reasons, quantum towers are considered valid.

* There are also 2 undescribed mechanisms:
- one that converts every card into its non-upgraded version if you're not fighting against a fake god. This mechanism takes place after the exclusion of pillars, so quantum towers might be chosen in first place and then converted into quantum pillars (that's common in PvP)
- and another that has a 10% chance to replace the first card of the shortlist by a shard, if you're fighting against a fake god. The shard inserted here is always the one that upgrades into Shard of Divinity.

260
General Discussion / Slot wheel mysteries revealed (finally!)
« on: December 15, 2009, 10:10:05 pm »

Interesting. He looks extremely weak compared to the rest- which is probably why he hasn't been activated.
Oh wait.
Did I forget to mention that I'm hosting the trainer on my personal website?
http://chriskang.free.fr/trainer/trainer.html

For some reason, it doesn't seem to work properly ;)
You might want to try fighting a FG there to see what I mean.

261
General Discussion / Slot wheel mysteries revealed (finally!)
« on: December 15, 2009, 10:10:05 pm »

For the gods, are cards selected from the base 30-60 card deck, or from the doubled 60-120 card deck?
From the base 30-60. Actually when I was working on the stats for the wiki I was curious and tested both cases in my simulator.
The results are exactly the same when picking from the doubled deck :)

And while we're on the topic of decks and spins, we know the composition of AI1, AI3 and god decks. How about AI2?
AI2 decks are taken from a set of 12 premade builds
AI3 decks are taken from a set of 11 other premade builds
FG decks are taken from a set of 11 other premade builds
It's interesting to notice that the data file actually contains 12 premade builds for AI3 and 12 for FG. But for some reason, the 12th can never be reached by the code. This is probably a bug.
If you want, I can put the build of the 12th fake god on the wiki (he's called "Ferox" and has mainly Life cards).

So farming decks should use quantum pillars instead of towers? Or any elemental pillar/tower?
Anything BUT quantum towers is OK.
The farming deck that gives the most chances for the player to win something is probably:
24 x pillar
6 x rare card of your choice

Also, if you have a wiki page or something I can link to in the first post that would be better than general statements from Zanzarino :)
Not yet. I'll try to create that soon.

262
General Discussion / Slot wheel mysteries revealed (finally!)
« on: December 15, 2009, 10:10:05 pm »

http://elementsthegame.wikia.com/wiki/Ferox

His strategy seems quite simple:
- dump 12 feral bonds
- surround you with mass creatures (44 in his deck)

This is somewhat similar to Fire Queen but doesn't rely on the queen's skill. Therefore, it's probably a bit more effective.

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

Assuming there's no special treatment of any cards at deck selection, and likewise when selecting cards for the spinners (except for pillars), then the chance of a successful spin yielding any particular card should be exactly the same for every eligible card.
Yes

If this is true, the chance of getting a particular card would be 1 in 122 (if I've counted right, and assuming the shards are excluded, ignoring the pillars as they should be rare enough not to matter).
Exactly. That's where my "less than 1%" comes from. The "far less" was a bit exaggerated ;)

The chance of getting a card after a win is a bit trickier to figure out, but the worst case scenario (no duplicates selected) would be 1 in 16 (1/42), or 1 in 25 if there's five cards in the spinner.
Agree too. There are 4 cards in the shortlist so the worst case is 1/16 (6.2 %). On average, my figure of 10% shouldn't be too far from truth.

If this is all correct, the chance of getting a (non-specific) rare isn't all that bad, really, at better than 1 in 140. Compared to the about 1 in 12 for Fire Queen it's not all that impressive, but only EE, Fahrenheit and shard are available there.
That seems pretty correct too. By taking 10% win rate at spinning, the calculus gives 1 rare for 90 victory with level 1 (instead of your 1/140).
This is indeed 7 times lower than Firefly Queen and AI3 (whose drop rates are very similar to FG).
IMHO, your best bet is still hoping for a rare farm deck in t50.

I don't know if this is well known or not but the best rare farm deck is undoubtedly something like this:
24 x useless pillar
6 x eternity

This has probably near 100% chance to give you the rare (on average, after 3 spins). And the changes for the player to get it are actually much much higher than, say:
18 x pillar
4 x pulv
4 x eternity
4 x eagle's eye


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

Why below 1%? If there's about 50 eligible cards to chose from, shouldn't there be about a 2% chance for any one of them? That should make it about 1 in 1500, if the first two numbers are accurate.
If it worked that way, the chances to win would be far too low, as you suspect.
The real algorithm is a bit more complex:
1. Pick a random card in your opponent's deck
2. If it's a pillar, go back to 1
3. Security mechanism (for builds that are composed of pillars only) : if, after 10 random picks, you still get a pillar then keep it
4. Store card in variable card1.
5. Repeat steps 1 to 4, until you have filled 4 variables
6. Now the spinning starts for 3 rounds but you only pick cards in [card1, card2, card3, card4]. This ways, the chances to pick 3 times the same one are much higher.

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