*Author

Active members:
Demagog(1) Spielkind(1) Dragoon(1) Ohmega(1) lehomard2(1) xingbing1(1) jerfle(1) Grunion(1) yeehaw(1) eszkis(1) Destrial(1) YoYoBro(1) fleetze(1) Lucifear(1) tyranim(1) teffy(1) mightyhat(1) haparas(1) ftbhrygvn(1) mafidufa(1) oorenotsoo(1) Wu_Li_Mammoth(1) Krzysiek K.(1) redjag(1) Antysiw(1) ajm6(1) bigbadbanana(1) fatelovesyou(1) hermantheowl(1) chimto(1) macgawel(1) Anh(1) Thalas(1) ackermiv(1) torchman(1) spcialbean(1) Drawckab(1) Kameda(1) Dreadshadow(1) Bacchus(1) Kent(1) Xoff(1) stop(1) K667(1) danieldubois(1) ItzSean(1) Lordpants(1) CB!(1) jo_jo_the_joker(1) ManOfManySpoons(1) xxxdeathxxx(1) jigga456(1) hello5666(1) didonko(1) dragonhuman(1) 918273645(1) Dam Mael(1) binde22(1) UsernameLife(1) ArcanisX(1) Darer(1) the dictator(1) Takeno_ita(1) BadWolfskin(1) sSethia(1) burne(1) the Sage(1) squishyone(1) P-e-K(1) Gyrodiot(1) trozman(1) kobisjeruk(1) Sengiratolom(1) windraker(1) Ifailgood(1) thekillergame(1) catalyzeme(1) PlayerOa(1) Karak(1) Mattman27007(1) Bird man(1) Gerontius(1) Immolation(1) andrebo(1) kri(1) Hotshot2k4(1) geekz_always_win(1) lolicjj(1) Chronophasic(1) CrazyJay94(1) BatCountry(1) lokiburn4(1) grindpower(1) mrwackjob1(1) pterror09(1) puppy33333(1) 7wavemaster(1) cambovenzi(1) unknown89089(1) Sodomir(1) BloodlinE(1) donkeyslap(1) Noobiecakes(1) zzz123(1) badivan1(1) tttt(1) jumpoffduck(1) funerallaughter(1) Malignant(1) choongmyoung(1) tdog0001(1) Imperator Feles(1) scauduro221095(1) Kiebur(1) omegareaper7(1) Bulrog(1) Tom Bombadil(1) Ravensvoice(1) FSK(1) funplay(1) derele(1) pervepic(1) axel1989(1) Chapuz(1) iCall_uHobo(1) Solarias(1) Nyxtegida(1) Naesala(1) DrOctaganapus2(1) RagingAlien(1) bogtro(1) Rastafla(1) avantasia666(1) Evil Hamster(2) deadwolf(2) xdude(2) Getawu2(2) Ghoststalker(2) unionruler(2) Kurohami(2) Boingo(2) Suuper(2) PhuzzY LogiK(2) Marvaddin(2) linkcat(2) Mastermind79(2) Stockholm(2) sbluen(2) tyedyeguy(2) lava golem(2) kurathedog(2) agentflare(2) ddevans96(2) ak65ala(2) ArtCrusade(2) Wynden(2) Kakerlake(2) silux(2) qui(2) Marcus Impudite(2) Elementalicious(2) TheForbiddenOracle(2) DeathPanda1(2) wavedash(2) Terrilocks(2) Rainbowninja(2) russianspy1234(2) Xenocidius(2) Kardo(2) Jocko(2) chriskang(3) bobcamel(3) Scaredgirl(3) Terroking(3) Delreich(3) Celyka(3) Glitch(3) edunavas(3) -Samura-(3) Wisemage(3) alienorigin(3) Belthazar666(3) Ashebrethafe(3) miniwally(3) MaxMilen(3) trisk22(3) olop4444(3) The_Mormegil(3) nerd1(3) 18237(3) Onizuka(3) parasite99(3) jmizzle7(4) zac80(4) BluePriest(4) DrunkDestroyer(4) doublecross(4) Bloodshadow(5) bojengles77(5) Hodari(5) Assassine(5) rowcla(5) Znork(5) Nume(6) deepdown(6) Bhlewos(6) Avenger(7) PuppyChow(7) coinich(7) finkel(7) EvaRia(7) Chromatophore(7) Eleahen(7) killsdazombies(8) Xinef(8) Colloray(8) UndeadSpider1990(8) calindu(8) smuglapse(9) morningstar(10) Genuinous(10) Essence(12) Ant-n-ero(13) Higurashi(14) dragonsdemesne(18)

chriskang

  • Guest
AI improvements https://elementscommunity.org/forum/index.php?topic=1422.msg13201#msg13201
« on: December 18, 2009, 04:13:32 pm »
As you know, Zanzarino allowed me to make some changes to the real game code.
As I don't want to disturb his work, I asked him to send me just one single function at a time, on which I'm going to work for a few days before I send it back to him.
My first request was the "autotarget" function and I'm currently working on it.
If you're not aware of it, this function is part of the AI mechanics: that's where the computer chooses the targets for its spells and its creature's abilities. More explanations here:
http://elementsthegame.wikia.com/wiki/User:Chriskang/Sandbox/10 (http://elementsthegame.wikia.com/wiki/User:Chriskang/Sandbox/10)
(see chapter 5: "Finding valuable targets: Function Autotarget")

I already corrected a few bugs (like the computer hurting its own death/darkness creatures with "holy light") and I'm now trying to improve the evaluation of creature's score.
I made some changes to correct the most common mistakes but I'll need some help with more tricky situations.
Here's what I want from you: give me examples of cases where the computer has several choices for the target of its skill and, in your opinion, does the wrong choice.
I'll start with a few examples (those are already corrected) :
* when you have a queen and a firefly in play, the computer uses sniper on the firefly (it would be much wiser to target to queen)
* when (you have a 0/5 Oty) and (the computer has a 0/5 Oty and an Elite Skeleton), it won't devour its own skel to take advantage over your Oty

Go on game experts, give me more situations where the targeting can be improved.

bobcamel

  • Guest
Re: AI improvements https://elementscommunity.org/forum/index.php?topic=1422.msg13204#msg13204
« Reply #1 on: December 18, 2009, 04:20:49 pm »
Using Momentum on general high statsum creatures instead of high attack creatures. You must have seen Momentumed Armagios. As well as Plate/HevE Armor - Targets strongest creatures instead of Otys/Brittle attackers.

Also, stacking multiple Infections on one creature, stacking all Blessings/Armors/Buffs on one creature instead of diversifying, Blessing a Dragon not Pegasus (Miracle) and so on.

Scaredgirl

  • Guest
Re: AI improvements https://elementscommunity.org/forum/index.php?topic=1422.msg13205#msg13205
« Reply #2 on: December 18, 2009, 04:23:02 pm »
Biggest fail of AI in my opinion is when he/she uses all his/her Explosions/Steals/Pulverizer to try take down a Bone Wall.

In other news.. I don't know how you are doing the targeting but I've always thought it would be cool if AI did random things. Like 90% of time it does what "makes sense" but 10% of time it does something completely random. That would make it more like a human opponent because you wouldn't be able to always guess what it's going to do next. Is something like that possible?

Evil Hamster

  • Guest
Re: AI improvements https://elementscommunity.org/forum/index.php?topic=1422.msg13207#msg13207
« Reply #3 on: December 18, 2009, 04:57:12 pm »
Biggest fail of AI in my opinion is when he/she uses all his/her Explosions/Steals/Pulverizer to try take down a Bone Wall.
Haha yes, make Rainbow even MORE difficult :P

Also, stacking multiple Infections on one creature, stacking all Blessings/Armors/Buffs on one creature instead of diversifying, Blessing a Dragon not Pegasus (Miracle) and so on.
Sometimes it's good to stack infections to kill a creature faster. It's situational though, so would require more than an if/then to figure it out.


chriskang

  • Guest
Re: AI improvements https://elementscommunity.org/forum/index.php?topic=1422.msg13210#msg13210
« Reply #4 on: December 18, 2009, 05:08:33 pm »
Using Momentum on general high statsum creatures instead of high attack creatures. You must have seen Momentumed Armagios.
It's not that easy. If player has an Oty, computer should not cast momentum on its own Ruby Dragon (cause the dragon is going to be devoured on next turn and the momentum will be lost). There's probably some place for improvement here but the "check atk only" rule is not right IMO.

As well as Plate/HevE Armor - Targets strongest creatures instead of Otys/Brittle attackers.
That's right. Added to my TODO list.

Also, stacking multiple Infections on one creature,
EH replied to that. I'll try to see what I can do.

stacking all Blessings/Armors/Buffs on one creature instead of diversifying,
Again I disagree. Stacking buffs on a creature is a good thing most of the time. That's precisely the behavior that you're expecting from the computer when it plays a TU deck.

Blessing a Dragon not Pegasus (Miracle) and so on.
This one is right. Dive should be taken into account.

Biggest fail of AI in my opinion is when he/she uses all his/her Explosions/Steals/Pulverizer to try take down a Bone Wall.
Added to my TODO list.

In other news.. I don't know how you are doing the targeting but I've always thought it would be cool if AI did random things. Like 90% of time it does what "makes sense" but 10% of time it does something completely random. That would make it more like a human opponent because you wouldn't be able to always guess what it's going to do next. Is something like that possible?
It's certainly possible. There's already some randomness in the final decision actually. But it's limited to "I do as expected" or "I cancel my action". When you were talking about "completely random", I guess you were thinking about "still acting but targeting another location than the most valuable", right?
I can do that. It would even be a good way to tone the difficulty down a bit. If Zanzarino nerfs Sundial and I make the AI stronger, there's a risk that the game becomes too hard for casual gamers.

Offline Avenger

  • Legendary Member
  • ******
  • Posts: 2227
  • Country: hu
  • Reputation Power: 25
  • Avenger is a proud Wyrm taking wing for the first time.Avenger is a proud Wyrm taking wing for the first time.Avenger is a proud Wyrm taking wing for the first time.Avenger is a proud Wyrm taking wing for the first time.Avenger is a proud Wyrm taking wing for the first time.
  • War veteran
  • Awards: Slice of Elements 8th Birthday CakeSilver DonorWar #8 Winner - Team FireWar #7 Winner - Team AetherWar #6 Winner - Team AetherWar #5 Winner - Team Aether
Re: AI improvements https://elementscommunity.org/forum/index.php?topic=1422.msg13215#msg13215
« Reply #5 on: December 18, 2009, 06:12:51 pm »
Otyugh should target the most dangerous creature to its life, which is not always the highest attack/defense creature.
I consider lobotomy the most dangerous, then infecting stuff, otyughs with close defense come then.

Maybe this is too much for the single function approach, but, what about thinking one step ahead by the enemy's side?
This is definitely something for higher difficulty.

Some simpler rules:
It is not a problem if you infect a creature multiple times, but don't infect it if it would die anyway (infections>current defense).
Don't play spark when hourglass is in effect, unless you got more scavengers/bone walls than the enemy.
Don't play dive while hourglass/phase shield/bonewall is in effect.
When counting attack, dive creature attacks worth double (if the enemy has air)
Growing creature attack/defenses should be calculated higher, probably 1-2 turns ahead.


Scaredgirl

  • Guest
Re: AI improvements https://elementscommunity.org/forum/index.php?topic=1422.msg13216#msg13216
« Reply #6 on: December 18, 2009, 06:19:56 pm »
In other news.. I don't know how you are doing the targeting but I've always thought it would be cool if AI did random things. Like 90% of time it does what "makes sense" but 10% of time it does something completely random. That would make it more like a human opponent because you wouldn't be able to always guess what it's going to do next. Is something like that possible?
It's certainly possible. There's already some randomness in the final decision actually. But it's limited to "I do as expected" or "I cancel my action". When you were talking about "completely random", I guess you were thinking about "still acting but targeting another location than the most valuable", right?
I can do that. It would even be a good way to tone the difficulty down a bit. If Zanzarino nerfs Sundial and I make the AI stronger, there's a risk that the game becomes too hard for casual gamers.
Yes, that. Something like this:

When the script list the targets in priority order, then it just randomly chooses one instead of going for the top priority target automatically.

65% chance of priority target 1
20% chance of priority target 2 (if available)
10% chance of priority target 3 (if available)
5% chance of doing nothing

Of course I pulled those numbers out of my ass but you get the idea.

Lets talk about the situation right now. Lets say I'm fighting a False God and  have only 1 HP left. He has 200+ damage on the table, doesn't have a weapon and has used all his weapon cards. This False God does however have Explosion in his hand.

Now if I play Sundial I know for a FACT that there is NO POSSIBLE WAY of him killing me during the next 2 turns because I have also other higher priority permanents on the table. AI will target those higher every single time.

But if AI made his decisions randomly like I suggested earlier, he might skip those higher priority targets, take out the Sundial and kill me.

Having this element of unpredictability would make the game more fun.

Offline Avenger

  • Legendary Member
  • ******
  • Posts: 2227
  • Country: hu
  • Reputation Power: 25
  • Avenger is a proud Wyrm taking wing for the first time.Avenger is a proud Wyrm taking wing for the first time.Avenger is a proud Wyrm taking wing for the first time.Avenger is a proud Wyrm taking wing for the first time.Avenger is a proud Wyrm taking wing for the first time.
  • War veteran
  • Awards: Slice of Elements 8th Birthday CakeSilver DonorWar #8 Winner - Team FireWar #7 Winner - Team AetherWar #6 Winner - Team AetherWar #5 Winner - Team Aether
Re: AI improvements https://elementscommunity.org/forum/index.php?topic=1422.msg13217#msg13217
« Reply #7 on: December 18, 2009, 06:28:18 pm »
Couldn't the AI (at least on false god level) find out that it can kill you in one step if it picks the right target?
It just have to try x times (the number of targets) and play the whole routine 'in head'.

Offline Demagog

  • Legendary Member
  • ******
  • Posts: 2557
  • Reputation Power: 40
  • Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.
  • New to Elements
Re: AI improvements https://elementscommunity.org/forum/index.php?topic=1422.msg13227#msg13227
« Reply #8 on: December 18, 2009, 07:55:17 pm »
If you make it so they target weapons more often, small rainbows are screwed. Eternity will be useless. A lot of people are going to need to remake their rainbow decks :-/

Offline Essence

  • Legendary Member
  • ******
  • Posts: 4340
  • Country: us
  • Reputation Power: 57
  • Essence is truly a Titan, worthy of respect and acknowledgement.Essence is truly a Titan, worthy of respect and acknowledgement.Essence is truly a Titan, worthy of respect and acknowledgement.Essence is truly a Titan, worthy of respect and acknowledgement.Essence is truly a Titan, worthy of respect and acknowledgement.Essence is truly a Titan, worthy of respect and acknowledgement.Essence is truly a Titan, worthy of respect and acknowledgement.Essence is truly a Titan, worthy of respect and acknowledgement.Essence is truly a Titan, worthy of respect and acknowledgement.Essence is truly a Titan, worthy of respect and acknowledgement.Essence is truly a Titan, worthy of respect and acknowledgement.
  • Voice of the Oracle -- Jezzie's Pimp -- Often Gone
  • Awards: 2nd Trials - Master of Water1st Trials - Master of WaterFG Deck-Designer - The OutcastsShard Madness! Competition WinnerEpic 3 Card Design Competition WinnerElder Recruiter
Re: AI improvements https://elementscommunity.org/forum/index.php?topic=1422.msg13230#msg13230
« Reply #9 on: December 18, 2009, 08:30:43 pm »
Of course, there's the relevant Wiki page (http://elementsthegame.wikia.com/wiki/Potential_AI_Improvements) to check.


Realistically, the various skills should be given a range of targeting values (beyond just "+3 value if skill exists".)  Things like bioluminescence should be worth +0 (no more targeting Fireflys over FFQs), photosynthesis and gravity pull would be around +1,  mutate and other potentially fail abilities along with momentum (which is already only great on a decent attacker) would be +2, most generally-useful abilities would be +3, and real game-changers like Queen, Destroy, Steal, Reverse Time, Sniper, and Devour would be +4.

I also third SG's suggestoin about randomness.

Also, in general, it would actually improve the AI's play quite a bit if, at the start of each turn, it looked through it's hand for free cards and played them first, then went through and played costed cards in order from most to least expensive.  That way, Graviton would get an Otyugh (and control of the board) on turn 1 instead of turn 4 or 5 after it's used all of it's Fire Masters. 

There are obviously circumstances when that isn't the case, but I think it would help.  At the very least, it should play all pillars first before it goes back and plays any other cards.  :)

If something happens and you think it deserves my attention, feel free to PM me. Other than that, I'm probably here if you want to shoot the breeze.

bobcamel

  • Guest
Re: AI improvements https://elementscommunity.org/forum/index.php?topic=1422.msg13243#msg13243
« Reply #10 on: December 18, 2009, 09:57:20 pm »
Then... like this

If no PU/TU in deck, diversify buff targets. If this is possible to code, that is...
If creature has 10+ HP and/or HP>ATK, don't Armor
If poison count on creature = creature HP, don't infect it anymore
When Momentum, play it on a creature with 4+ attack
Really check for buffs if there is a playable PU/TU in hand and play them on your strongest creature, then PU/TU. Not before.
Use Photosynthesis multiple times until 12 Light quanta is reached, not once per turn per Rust/Leaf Dragon!

Offline Terroking

  • Legendary Member
  • ******
  • Posts: 2166
  • Reputation Power: 29
  • Terroking is a proud Wyrm taking wing for the first time.Terroking is a proud Wyrm taking wing for the first time.Terroking is a proud Wyrm taking wing for the first time.Terroking is a proud Wyrm taking wing for the first time.Terroking is a proud Wyrm taking wing for the first time.
  • The best practice is experience.
  • Awards: Silver DonorSlice of Elements 4th Birthday Cake5th Trials - Master of Earth2nd Trials - Master of Earth1st Trials - Master of EarthWeekly Tournament WinnerChampionship League 1/2010 2nd Place9th Tournament 1st PlaceDesign A Quest 1st PlaceSS competition #1 2ndHalfblood Recruiter
Re: AI improvements https://elementscommunity.org/forum/index.php?topic=1422.msg13259#msg13259
« Reply #11 on: December 18, 2009, 11:19:40 pm »
also just wanted to say that the AI will target higher attack creatures over ones that deal more damage.

for example I play a have 9 life quanta, and play a frog, adrenaline it, then use an upped cockatrice. the frog's damage dealt at the end of the turn will be 12, and the cockatrice 5, but the frog is a lower-priority target (Statuses don't count as skills for the +3 apparently). Of course this is with adrenaline, which isn't out yet, but i'm assuming that the better AI will come out with the new cards.

Like the randomness and the suggestion about skill priority. also something needs to be said about the AI decking itself (as rainbow).

EDIT: also wasting quant to play more eclipses/nightfalls or playing it when they have no creatures and the enemy does
I ask nothing of humanity but fairness in all things, but I do not expect even that.

 

blarg: