*Author

Offline OldTrees

  • Legendary Member
  • ******
  • Posts: 10297
  • Reputation Power: 114
  • OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.
  • I was available for questions.
  • Awards: Brawl #2 Winner - Team FireTeam Card Design Winner
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg410815#msg410815
« Reply #24 on: October 16, 2011, 05:13:26 am »
Quote from: chriskang date=1260897003
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.
chriskang went on to help Zanzarino for a while before disappearing.
"It is common sense to listen to the wisdom of the wise. The wise are marked by their readiness to listen to the wisdom of the fool."
"Nothing exists that cannot be countered." -OldTrees on indirect counters
Ask the Idea Guru: http://elementscommunity.org/forum/index.php/topic,32272.0.htm

Offline XenocidiusTopic starter

  • Legendary Member
  • ******
  • Posts: 2696
  • Reputation Power: 49
  • Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.
  • Fear the Darkness ...
  • Awards: Slice of Elements 3rd Birthday CakeFavorite Community Member of 2011Weekly Tournament WinnerWinner of Design a Competition Competition
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg410820#msg410820
« Reply #25 on: October 16, 2011, 05:21:04 am »
That sums it up well. Though I certainly won't cheat I can't say the same for others. So I won't post the source or give any advice on decompiling.

Now let's get back on-topic or I'll lock the thread myself.
Don't cry because it's over, smile because it happened.

Offline bored_ninja777

  • Hero Member
  • *****
  • Posts: 1080
  • Reputation Power: 13
  • bored_ninja777 is taking their first peeks out of the Antlion's burrow.bored_ninja777 is taking their first peeks out of the Antlion's burrow.
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg410859#msg410859
« Reply #26 on: October 16, 2011, 06:17:55 am »
im all for helping people just the methods of doing so i dont necessarily approve of, as in without asking Zanz first. even with prior actions that were "ok" doesnt always mean it is now.. but maybe thats just me.

Is there any way to fix the priority system that is in place based on what youve seen?
~McPasty was here~

Offline dragonsdemesne

  • Legendary Member
  • ******
  • Posts: 5283
  • Country: aq
  • Reputation Power: 63
  • dragonsdemesne shines with the light of the Morning Glory!dragonsdemesne shines with the light of the Morning Glory!dragonsdemesne shines with the light of the Morning Glory!dragonsdemesne shines with the light of the Morning Glory!dragonsdemesne shines with the light of the Morning Glory!dragonsdemesne shines with the light of the Morning Glory!dragonsdemesne shines with the light of the Morning Glory!dragonsdemesne shines with the light of the Morning Glory!dragonsdemesne shines with the light of the Morning Glory!dragonsdemesne shines with the light of the Morning Glory!dragonsdemesne shines with the light of the Morning Glory!dragonsdemesne shines with the light of the Morning Glory!
  • Leeeeeeeeeeroyyyyyyyyy....
  • Awards: Weekly Tournament WinnerWeekly Tournament WinnerWeekly Tournament WinnerWeekly Tournament WinnerWeekly Tournament WinnerWeekly Tournament WinnerWeekly Tournament WinnerBattle League 1/2014 2nd PlaceWeekly Tournament WinnerBattle League 3/2013 2nd PlaceWeekly Tournament WinnerWeekly Tournament WinnerWeekly Tournament WinnerBattle League 2/2013 WinnerBattle League 1/2013 2nd PlaceWeekly Tournament WinnerChampionship League 3/2012 2nd PlaceWeekly Tournament WinnerWeekly Tournament WinnerChampionship League 2/2012 3rd Place
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg410863#msg410863
« Reply #27 on: October 16, 2011, 06:30:39 am »
Okay, you're right. I found the piece of code controlling it.

So the algorithm is:

1. Pick a random card.
2. If it is a nymph, then 50% chance to select another card.
Assuming that this is correct, I calculate the chance for an oracle visit to yield a nymph as 3.015%

I assumed that all cards had an equal chance of being selected, with the exception for the nymph.  This might be wrong if, for example, the element is picked first and then a card within that element is picked, because different elements have differing numbers of cards.  It could also be wrong if pillars/pends/rares have different chances to be picked than base cards, and how "other" element cards are factored in.  (it also assumes the purple nymph bug is fixed!)

Offline The_Mormegil

  • Legendary Member
  • ******
  • Posts: 2262
  • Country: it
  • Reputation Power: 32
  • The_Mormegil is a Ghost, obsessed with their Elemental pursuits.The_Mormegil is a Ghost, obsessed with their Elemental pursuits.The_Mormegil is a Ghost, obsessed with their Elemental pursuits.The_Mormegil is a Ghost, obsessed with their Elemental pursuits.The_Mormegil is a Ghost, obsessed with their Elemental pursuits.The_Mormegil is a Ghost, obsessed with their Elemental pursuits.
  • Intelligence is overrated.
  • Awards: Slice of Elements 10th Birthday CakeWar #5 Winner - Team AetherTeam PvP WinnerNew Slot Winner - FamiliarDeadly Sin Winner - GluttonyFirst Budosei of BudokanWinner of Revive the Archive
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg410870#msg410870
« Reply #28 on: October 16, 2011, 06:47:00 am »
Is there any way to fix the priority system that is in place based on what youve seen?
More specifically, how much would it hinder the code or the speed of the AI if instead of the score / estimate system you introduced an array (or better yet a hash if that's possible in Flash) for every targeting effect?

For instance, if we created a community project that would create a "ladder" for every effect, possibly with some conditionals to spice it up, would it hinder the game if it was introduced? I don't think that Zanz would go with that as it is a major change to the game and everything, but I'm curious.
[18:21:43] jmdt: elements is just math over top of a GUI
Kakerlake: I believe that there is no God as in something that can think by itself and does stuff that sounds way OP.

Offline XenocidiusTopic starter

  • Legendary Member
  • ******
  • Posts: 2696
  • Reputation Power: 49
  • Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.
  • Fear the Darkness ...
  • Awards: Slice of Elements 3rd Birthday CakeFavorite Community Member of 2011Weekly Tournament WinnerWinner of Design a Competition Competition
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg410872#msg410872
« Reply #29 on: October 16, 2011, 06:52:55 am »
Do you mean a list of permanents by order of priority or something else?

I don't imagine it would hinder the game at all; a small amount of processing like that is insignificant.
Don't cry because it's over, smile because it happened.

Offline OldTrees

  • Legendary Member
  • ******
  • Posts: 10297
  • Reputation Power: 114
  • OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.
  • I was available for questions.
  • Awards: Brawl #2 Winner - Team FireTeam Card Design Winner
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg410873#msg410873
« Reply #30 on: October 16, 2011, 06:58:32 am »
Is there any way to fix the priority system that is in place based on what youve seen?
More specifically, how much would it hinder the code or the speed of the AI if instead of the score / estimate system you introduced an array (or better yet a hash if that's possible in Flash) for every targeting effect?

For instance, if we created a community project that would create a "ladder" for every effect, possibly with some conditionals to spice it up, would it hinder the game if it was introduced? I don't think that Zanz would go with that as it is a major change to the game and everything, but I'm curious.
The score /estimate system was an improvement in the intelligence of the AI. It allowed it to target the highest priority target with reasonable accuracy and have the importance of the target factor into the decision to play now or wait till later for a better play. This decision is being made based on the current variables of the target.


Question: Does the AI recognize if a weapon is frozen when considering using PC?
Question2: Does the AI notice if its weapon is Frozen, Delayed or Protected when considering Flying weapon?
"It is common sense to listen to the wisdom of the wise. The wise are marked by their readiness to listen to the wisdom of the fool."
"Nothing exists that cannot be countered." -OldTrees on indirect counters
Ask the Idea Guru: http://elementscommunity.org/forum/index.php/topic,32272.0.htm

Offline furballdn

  • Legendary Member
  • ******
  • Posts: 7573
  • Reputation Power: 86
  • furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.
  • Facetious trollnotmod
  • Awards: Epic 3 Card Winner - Clockwork GolemBest Recruiter of FriendsBest JournalistBest Chat PainterBattle - Slayer of The Great ChimeraBest Crafted Relic of Other
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg410875#msg410875
« Reply #31 on: October 16, 2011, 07:06:30 am »
When does the AI play a dim shield? I noticed they won't play it if you have no creatures on the field even if they have the shields in their hand and enough quanta.

Offline pikachufan2164

  • Legendary Member
  • ******
  • Posts: 2938
  • Country: ca
  • Reputation Power: 40
  • pikachufan2164 soars like the Phoenix, unable to be repressed.pikachufan2164 soars like the Phoenix, unable to be repressed.pikachufan2164 soars like the Phoenix, unable to be repressed.pikachufan2164 soars like the Phoenix, unable to be repressed.pikachufan2164 soars like the Phoenix, unable to be repressed.pikachufan2164 soars like the Phoenix, unable to be repressed.pikachufan2164 soars like the Phoenix, unable to be repressed.pikachufan2164 soars like the Phoenix, unable to be repressed.
  • Phase in, phase out.
  • Awards: Rouser of Willng3 RecruitsWeekly Tournament WinnerWar #5 Winner - Team AetherSlice of Elements 3rd Birthday CakeTeam PvP #4 WinnerSlice of Elements 2nd Birthday Cake 	2nd Trivia Winner
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg410888#msg410888
« Reply #32 on: October 16, 2011, 07:58:43 am »
When does the AI play a dim shield? I noticed they won't play it if you have no creatures on the field even if they have the shields in their hand and enough quanta.
The AI will only play and chain Dim Shields when they're in enough danger. According to Chriskang's AI notes,

If card is (Dimensional Shield or Phase Shield) and (the currently equipped shield is not invulnerable) and (current HP) / (yellow part of HP bar + 1) < 15 then play card

I'm doing science, and I'm still alive.

Level 2 Magic Judge.

Offline Jenkar

  • Legendary Member
  • ******
  • Posts: 4199
  • Country: fr
  • Reputation Power: 58
  • Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.
  • Heart's made of shadows
  • Awards: Slice of Elements 8th Birthday CakeSlice of Elements 7th Birthday CakeChampionship League 2/2013 WinnerSlice of Elements 4th Birthday Cake6th Trials - Master of AirWinner of Revive the Archive 2!Slice of Elements 3rd Birthday CakeBeginners League 1/2012 WinnerWeekly Tournament Winner5th Trials - Master of AirAvatar of Patience - Winner of the 7 Heavenly Virtues Deck CompetitionBeginners League 3/2011 3rd PlaceC-C-C-Combo Maker Winner!
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg410890#msg410890
« Reply #33 on: October 16, 2011, 08:21:10 am »
Okay, you're right. I found the piece of code controlling it.

So the algorithm is:

1. Pick a random card.
2. If it is a nymph, then 50% chance to select another card.
Assuming that this is correct, I calculate the chance for an oracle visit to yield a nymph as 3.015%

I assumed that all cards had an equal chance of being selected, with the exception for the nymph.  This might be wrong if, for example, the element is picked first and then a card within that element is picked, because different elements have differing numbers of cards.  It could also be wrong if pillars/pends/rares have different chances to be picked than base cards, and how "other" element cards are factored in.  (it also assumes the purple nymph bug is fixed!)
Miracle's not in the pool.
The madness is in each of us. Close your eyes, sing, and open your webbed wings to the silent winds.
Beautiful art : http://i.imgur.com/eUhyYCC.png

Offline XenocidiusTopic starter

  • Legendary Member
  • ******
  • Posts: 2696
  • Reputation Power: 49
  • Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.
  • Fear the Darkness ...
  • Awards: Slice of Elements 3rd Birthday CakeFavorite Community Member of 2011Weekly Tournament WinnerWinner of Design a Competition Competition
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg410892#msg410892
« Reply #34 on: October 16, 2011, 08:29:03 am »
Question: Does the AI recognize if a weapon is frozen when considering using PC?
Question2: Does the AI notice if its weapon is Frozen, Delayed or Protected when considering Flying weapon?
No.
No.

When does the AI play a dim shield? I noticed they won't play it if you have no creatures on the field even if they have the shields in their hand and enough quanta.
The AI will only play and chain Dim Shields when they're in enough danger. According to Chriskang's AI notes,

If card is (Dimensional Shield or Phase Shield) and (the currently equipped shield is not invulnerable) and (current HP) / (yellow part of HP bar + 1) < 15 then play card
Yep, that's still accurate, but is also the same for Wings. Also, it only does it if the counter of the current shield is 0 or nonexistent (if it has counters left on Wings it will not play Phase Shield).
Don't cry because it's over, smile because it happened.

Offline 10 men

  • Sr. Member
  • ****
  • Posts: 987
  • Country: de
  • Reputation Power: 0
  • 10 men hides under a Cloak.
  • Honesty is the privilege of the infallible
  • Awards: 6th Trials - Master of TimeWinner of Draft #3 - PvP EventWeekly Tournament WinnerWeekly Tournament Winner5th Trials - Master of Time4th Trials - Master of TimeWeekly Tournament WinnerWeekly Tournament WinnerShard Revolution WinnerSlice of Elements 2nd Birthday CakeWar #2 Winner - Team Entropy
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg410947#msg410947
« Reply #35 on: October 16, 2011, 12:44:30 pm »
What's the AI priority with permanents? I noticed the AI tends to hate my hourglass more than my arsenic more than my fog shield.
For permanents, this formula is used for score. Destroy and steal both have an estimate of -1.

Score = (permanent cost + 1)  * -estimate / 20

That means that the permanent with the highest cost will get targeted. If two permanents have the same cost the one with a lower slot number will be targeted.

That's not entirely true, from my experience in game the AI will target Eternity over anything else (including for example Permafrost Shield) and Hourglass over everything other than Eternity. I think there could also be an exception for Bone Wall (I think it takes Pulverizer over BW).
edit. Also Fahrenheit over Fire Buckler.
"My big fear is that one day I may become so vain that I will quote myself in my own signature."  ---  10 men

 

anything
blarg: