*Author

Offline rosutosefiTopic starter

  • Sr. Member
  • ****
  • Posts: 727
  • Reputation Power: 10
  • rosutosefi is taking their first peeks out of the Antlion's burrow.rosutosefi is taking their first peeks out of the Antlion's burrow.
  • Dead.
  • Awards: Slice of Elements 2nd Birthday Cake
A simple test with USEM https://elementscommunity.org/forum/index.php?topic=30432.msg386609#msg386609
« on: August 30, 2011, 05:06:25 am »
If USEM faced a farm, how fast would it win? Yeah, useless facts...

I ran some tests on trainer. But after 5 minuets, I gave up. There has to be another way.
Then I tried programming to simulate games. As a newbie programmer (started learning it 2 months ago), this would be a challenge.

Spoiler for The extremely fat code:
clear
clc
matches = input('Number of games played: ');
addedttw = 0;
ttwtable = zeros(1,16);
for match = 1:matches
weapon = 0;
attack = 0;
automulligan = 0;
quanta = 0;
ehp = 100;
tplay = 1;
turn = 0;
th = 0;
%by light_sefi
while automulligan~=2 && th == 0
    tow = 10;
    swd = 2;
    fro = 6;
    coc = 6;
    hea = 6;
    sh = 0;
    fh = 0;
    ch = 0;
    hh = 0;
    for draw=1:7
        deck = tow+swd+fro+coc+hea;
        if rand(1)*deck<tow && tow ~= 0
            tow = tow-1;
            th = th+1;
        elseif rand(1)*deck<tow+swd && swd ~= 0
            swd = swd-1;
            sh = sh+1;
        elseif rand(1)*deck<tow+swd+fro && fro ~= 0
            fro = fro-1;
            fh = fh+1;
        elseif rand(1)*deck<tow+swd+fro+coc && coc ~= 0
            coc = coc-1;
            ch = ch+1;
        elseif rand(1)*deck<=tow+swd+fro+coc+hea && hea ~=0
            hea = hea-1;
            hh = hh+1;
        end
    end
automulligan = automulligan+1;
%by light_sefi
end
    if rand(1)<0.5
        deck = tow+swd+fro+coc+hea;
        if rand(1)*deck<tow && tow ~= 0
            tow = tow-1;
            th = th+1;
        elseif rand(1)*deck<tow+swd && swd ~= 0
            swd = swd-1;
            sh = sh+1;
        elseif rand(1)*deck<tow+swd+fro && fro ~= 0
            fro = fro-1;
            fh = fh+1;
        elseif rand(1)*deck<tow+swd+fro+coc && coc ~= 0
            coc = coc-1;
            ch = ch+1;
        elseif rand(1)*deck<=tow+swd+fro+coc+hea && hea ~=0
            hea = hea-1;
            hh = hh+1;
        end
    end
    while ehp > 0 %the game
        while th ~=0
            th = th-1;
            tplay = tplay + 1;
            quanta = quanta + 1;
        end
        while quanta > 0 && sh > 0 && weapon < 1
            sh = sh-1;
            weapon = 1;
            attack = attack + 6;
            quanta = quanta - 1;
        end
        while quanta > 1 && fh > 0
            fh = fh-1;
            attack = attack + 5;
            quanta = quanta - 2;
        end
        while quanta > 2 && ch > 0
            ch = ch-1;
            attack = attack + 5;
            quanta = quanta - 3;
        end
        %endturn
        turn = turn+1;
        if sh+fh+ch+hh == 8
            if sh == 1 && weapon == 1
                sh = sh-1;
            elseif hh > 0
                hh = hh-1;
            elseif ch > 0
                ch = ch-1;
            elseif fh > 0
                fh = fh-1;
            end
        end
        ehp = ehp-attack;
        quanta = quanta + tplay;
        deck = tow+swd+fro+coc+hea;
        if rand(1)*deck<tow && tow ~= 0
            tow = tow-1;
            th = th+1;
        elseif rand(1)*deck<tow+swd && swd ~= 0
            swd = swd-1;
            sh = sh+1;
        elseif rand(1)*deck<tow+swd+fro && fro ~= 0
            fro = fro-1;
            fh = fh+1;
        elseif rand(1)*deck<tow+swd+fro+coc && coc ~= 0
            coc = coc-1;
            ch = ch+1;
        elseif rand(1)*deck<=tow+swd+fro+coc+hea && hea ~=0
            hea = hea-1;
            hh = hh+1;
        end
    end
ttwtable(turn) = ttwtable(turn) + 1;
end
%by light_sefi
for add = 1:16
    addedttw =  addedttw + add*ttwtable(add);
    if ttwtable(add)~=0
    fprintf('%d turns: %d (%g%%)\n', add, ttwtable(add), ttwtable(add)*100/matches)
    end
end
averagettw = addedttw/matches;
fprintf('Average turns to win: %g\n', averagettw)
And the results!

USEMulator Results

Spoiler for Hidden:
Test #1
Number of games played: 130000000
4 turns: 31776 (0.0244431%)
5 turns: 79881767 (61.4475%)
6 turns: 45115511 (34.7042%)
7 turns: 4203277 (3.23329%)
8 turns: 629129 (0.483945%)
9 turns: 117379 (0.0902915%)
10 turns: 18767 (0.0144362%)
11 turns: 2104 (0.00161846%)
12 turns: 270 (0.000207692%)
13 turns: 20 (0.0000153846%)
Average turns to win: 5.43043

Test #2
Number of games played: 100000000
4 turns: 24292 (0.024292%)
5 turns: 61450018 (61.450018%)
6 turns: 34702273 (34.702273%)
7 turns: 3233596 (3.233596%)
8 turns: 483087 (0.483087%)
9 turns: 90585 (0.090585%)
10 turns: 14327 (0.014327%)
11 turns: 1608 (0.001608%)
12 turns: 200 (0.0002%)
13 turns: 14 (0.000014%)
Average turns to win: 5.430396

Test #3
Number of games played: 10000000
4 turns: 2427 (0.02427%)
5 turns: 6147018 (61.47018%)
6 turns: 3469132 (34.69132%)
7 turns: 321968 (3.21968%)
8 turns: 48664 (0.48664%)
9 turns: 9133 (0.09133%)
10 turns: 1470 (0.01470%)
11 turns: 160 (0.0016%)
12 turns: 24 (0.00024%)
13 turns: 4 (0.00004%)
Average turns to win: 5.430167

Test #4
Number of games played: 10000000
4 turns: 2365 (0.02365%)
5 turns: 6146981 (61.46981%)
6 turns: 3468637 (34.68637%)
7 turns: 322742   (3.22742%)
8 turns: 48451 (0.48451%)
9 turns: 9147 (0.09147%)
10 turns: 1490 (0.01490%)
11 turns: 156 (0.00156%)
12 turns: 29 (0.00029%)
13 turns: 2 (0.00002%)
Average turns to win: 5.43023

Test #5
Number of games played: 10000000
4 turns: 2427 (0.02427%)
5 turns: 6142749 (61.4275%)
6 turns: 3472992 (34.7299%)
7 turns: 322989 (3.22989%)
8 turns: 48158 (0.48158%)
9 turns: 9073 (0.09073%)
10 turns: 1427 (0.01427%)
11 turns: 162 (0.00162%)
12 turns: 20 (0.0002%)
13 turns: 3 (0.00003%)
Average turns to win: 5.43056

Test %6
Number of games played: 10000000
4 turns: 2325 (0.02325%)
5 turns: 6146605 (61.4661%)
6 turns: 3468873 (34.6887%)
7 turns: 322883 (3.22883%)
8 turns: 48559 (0.48559%)
9 turns: 9136 (0.09136%)
10 turns: 1417 (0.01417%)
11 turns: 172 (0.00172%)
12 turns: 27 (0.00027%)
13 turns: 2 (0.00002%)
14 turns: 1 (0.00001%)
Average turns to win: 5.43029

Test #7
Number of games played: 10000000
4 turns: 2432 (0.02432%)
5 turns: 6145233 (61.4523%)
6 turns: 3470169 (34.7017%)
7 turns: 323089 (3.23089%)
8 turns: 48323 (0.48323%)
9 turns: 9132 (0.09132%)
10 turns: 1438 (0.01438%)
11 turns: 151 (0.00151%)
12 turns: 30 (0.0003%)
13 turns: 3 (0.00003%)
Average turns to win: 5.43037

Test #8
Number of games played: 10000000
4 turns: 2355 (0.02355%)
5 turns: 6144181 (61.4418%)
6 turns: 3471146 (34.7115%)
7 turns: 323536 (3.23536%)
8 turns: 48328 (0.48328%)
9 turns: 8963 (0.08963%)
10 turns: 1336 (0.01336%)
11 turns: 135 (0.00135%)
12 turns: 19 (0.00019%)
13 turns: 1 (0.00001%)
Average turns to win: 5.43043

Test #9
Number of games played: 10000000
4 turns: 2459 (0.02459%)
5 turns: 6146103 (61.461%)
6 turns: 3469458 (34.6946%)
7 turns: 323147 (3.23147%)
8 turns: 48156 (0.48156%)
9 turns: 9102 (0.09102%)
10 turns: 1402 (0.01402%)
11 turns: 156 (0.00156%)
12 turns: 17 (0.00017%)
Average turns to win: 5.43022

Test #10
Number of games played: 200000000
4 turns: 48594 (0.024297%)
5 turns: 122896525 (61.4483%)
6 turns: 69410180 (34.7051%)
7 turns: 6464142 (3.23207%)
8 turns: 967406 (0.483703%)
9 turns: 180806 (0.090403%)
10 turns: 28679 (0.0143395%)
11 turns: 3199 (0.0015995%)
12 turns: 436 (0.000218%)
13 turns: 32 (0.000016)
14 turns: 1 (0.0000005%)
Average turns to win: 5.43041

TTW of 5.430 and 0.024% chance to get a 4-turn win. It also got two 14-turn wins out of 500000000 games.
Interesting, but useless.

And yes, it was played at maximum efficiency. AI for USEM is very easy to program.  ;)

That's what happens when I get bored with no internet  thanks to the typhoon.
« Last Edit: May 31, 2012, 09:48:41 am by rosutosefi »
Not so active.

Offline majofa

  • Legendary Member
  • ******
  • *
  • Posts: 6050
  • Reputation Power: 90
  • majofa is a mythical and divine giver of immortality, one of the Turquoise Nymphs.majofa is a mythical and divine giver of immortality, one of the Turquoise Nymphs.majofa is a mythical and divine giver of immortality, one of the Turquoise Nymphs.majofa is a mythical and divine giver of immortality, one of the Turquoise Nymphs.majofa is a mythical and divine giver of immortality, one of the Turquoise Nymphs.majofa is a mythical and divine giver of immortality, one of the Turquoise Nymphs.majofa is a mythical and divine giver of immortality, one of the Turquoise Nymphs.majofa is a mythical and divine giver of immortality, one of the Turquoise Nymphs.majofa is a mythical and divine giver of immortality, one of the Turquoise Nymphs.majofa is a mythical and divine giver of immortality, one of the Turquoise Nymphs.majofa is a mythical and divine giver of immortality, one of the Turquoise Nymphs.majofa is a mythical and divine giver of immortality, one of the Turquoise Nymphs.majofa is a mythical and divine giver of immortality, one of the Turquoise Nymphs.majofa is a mythical and divine giver of immortality, one of the Turquoise Nymphs.majofa is a mythical and divine giver of immortality, one of the Turquoise Nymphs.
  • Awards: Forum Brawl #5 Winner - Abyss BrawlersWar #8 - Sportsmanship AwardForum Brawl #4 WinnerROCK-PAPER-SCISSORS-LIZARD-SPOCK Bazinger2012 - PvP World ChampionSapphire Shard of PvP Events6th Trials - Master of WaterCard Idea Decks - Space CreaturesBrawl #1 Winner - Team Nyan SharksWinner of 12 Lives - PvP Event #2Weekly Tournament WinnerWeekly Tournament WinnerPvP Player of the Year - 2011Weekly Tournament WinnerWeekly Tournament WinnerWeekly Tournament WinnerWinner of Raise the Stakes PvP Event #14th Trials - Master of LightWeekly Tournament WinnerWar #3 Winner - Team FireWeekly Tournament WinnerVictor of the 1st Card Design War24 Club - Most Expensive Players during War AuctionWinner of Team PvP #3Weekly Tournament WinnerWinner of 12 Lives PvP Event #1Weekly Tournament WinnerWeekly Tournament WinnerWeekly Tournament Winner
Re: A simple test with USEM https://elementscommunity.org/forum/index.php?topic=30432.msg386648#msg386648
« Reply #1 on: August 30, 2011, 07:41:15 am »
That's pretty cool.

I have an idea for the next time your internet goes out... What is the fastest mono deck for each element.

Requirements:
All cards must be of the specific element. (No other cards or off-element marks)
Imagine this deck facing an opponent who only has pillars in his deck. (So you can totally maximize on speed, plus you don't have extra programming)

I'd start with upped versions of the deck.

Offline Xenocidius

  • 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: A simple test with USEM https://elementscommunity.org/forum/index.php?topic=30432.msg386654#msg386654
« Reply #2 on: August 30, 2011, 07:45:17 am »
That's pretty cool.

I have an idea for the next time your internet goes out... What is the fastest mono deck for each element.

Requirements:
All cards must be of the specific element. (No other cards or off-element marks)
Imagine this deck facing an opponent who only has pillars in his deck. (So you can totally maximize on speed, plus you don't have extra programming)

I'd start with upped versions of the deck.
Could be quite hard, some may require more complex AI.
Don't cry because it's over, smile because it happened.

Offline rosutosefiTopic starter

  • Sr. Member
  • ****
  • Posts: 727
  • Reputation Power: 10
  • rosutosefi is taking their first peeks out of the Antlion's burrow.rosutosefi is taking their first peeks out of the Antlion's burrow.
  • Dead.
  • Awards: Slice of Elements 2nd Birthday Cake
Re: A simple test with USEM https://elementscommunity.org/forum/index.php?topic=30432.msg386747#msg386747
« Reply #3 on: August 30, 2011, 01:35:34 pm »
I'll try programming simple decks when I get bored again.  :))
Not so active.

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: A simple test with USEM https://elementscommunity.org/forum/index.php?topic=30432.msg386795#msg386795
« Reply #4 on: August 30, 2011, 03:52:43 pm »
I imagine the following:
 :earth :aether :life :light :water :darkness :death will be simple, as they probably aren't that different from USEM. Life might be a bit more trouble if you want it to use Mitosis, but Adrenarush is probably faster. Darkness has Eclipse, and Death has Arsenic, but they aren't too difficult to code.
 :air :gravity :time will be slightly worse, because for air, you probably need to consider Fireflies + UGs and the very least Sky Blitz; for gravity there's Acceleration and Catapult; for time there's extra draws to count (precog, probably hourglasses).
 :fire will be a lot more difficult due to Cremations, Cremation targets, Lava Golem's growth from excess Cremation quanta, if any, and phoenixes' rebirth.
And I think the best way to rush with Entropy (although I might be off) involves Improved Mutation... Or maybe just abomidragon spam?
[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 Djhopper :)

  • Sr. Member
  • ****
  • Posts: 559
  • Reputation Power: 7
  • Djhopper :) is a Spark waiting for a buff.
  • New to Elements
Re: A simple test with USEM https://elementscommunity.org/forum/index.php?topic=30432.msg386798#msg386798
« Reply #5 on: August 30, 2011, 04:04:22 pm »
And I think the best way to rush with Entropy (although I might be off) involves Improved Mutation... Or maybe just abomidragon spam?
For pure rush, you want abominations, discords and dragons. (as long as your cards don't HAVE to be upped (abominations) )


Offline rosutosefiTopic starter

  • Sr. Member
  • ****
  • Posts: 727
  • Reputation Power: 10
  • rosutosefi is taking their first peeks out of the Antlion's burrow.rosutosefi is taking their first peeks out of the Antlion's burrow.
  • Dead.
  • Awards: Slice of Elements 2nd Birthday Cake
Re: A simple test with USEM https://elementscommunity.org/forum/index.php?topic=30432.msg387092#msg387092
« Reply #6 on: August 31, 2011, 10:03:35 am »
Light won't be too hard. I'll try a blessed pegasi deck when I have time to do it. Shriekers will be next. I'll start looking for decks and save them so that I can just pull one and test when I feel bored.  :D
Not so active.

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: A simple test with USEM https://elementscommunity.org/forum/index.php?topic=30432.msg403830#msg403830
« Reply #7 on: October 04, 2011, 03:35:19 am »
you have matlab? i used that in my AI class in college.. that is strange IDE to program in.. really no rules..
~McPasty was here~

Offline jmdt

  • Legendary Member
  • ******
  • Posts: 2782
  • Reputation Power: 33
  • jmdt is a Ghost, obsessed with their Elemental pursuits.jmdt is a Ghost, obsessed with their Elemental pursuits.jmdt is a Ghost, obsessed with their Elemental pursuits.jmdt is a Ghost, obsessed with their Elemental pursuits.jmdt is a Ghost, obsessed with their Elemental pursuits.jmdt is a Ghost, obsessed with their Elemental pursuits.
  • New to Elements
  • Awards: Slice of Elements 10th Birthday Cake
Re: A simple test with USEM https://elementscommunity.org/forum/index.php?topic=30432.msg403834#msg403834
« Reply #8 on: October 04, 2011, 03:41:11 am »
Matlab...I approve :)

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: A simple test with USEM https://elementscommunity.org/forum/index.php?topic=30432.msg403839#msg403839
« Reply #9 on: October 04, 2011, 03:46:27 am »
can you get it free somewhere? my professor made it seem like you have to pay a lot for it.. and its a very powerful tool :)used it in my class to help diagnose breast cancer patients based on raw data and had to improve it.. all the crazy math involved O_o
~McPasty was here~

Offline jmdt

  • Legendary Member
  • ******
  • Posts: 2782
  • Reputation Power: 33
  • jmdt is a Ghost, obsessed with their Elemental pursuits.jmdt is a Ghost, obsessed with their Elemental pursuits.jmdt is a Ghost, obsessed with their Elemental pursuits.jmdt is a Ghost, obsessed with their Elemental pursuits.jmdt is a Ghost, obsessed with their Elemental pursuits.jmdt is a Ghost, obsessed with their Elemental pursuits.
  • New to Elements
  • Awards: Slice of Elements 10th Birthday Cake
Re: A simple test with USEM https://elementscommunity.org/forum/index.php?topic=30432.msg403844#msg403844
« Reply #10 on: October 04, 2011, 04:10:12 am »
can you get it free somewhere? my professor made it seem like you have to pay a lot for it.. and its a very powerful tool :)used it in my class to help diagnose breast cancer patients based on raw data and had to improve it.. all the crazy math involved O_o
Free...no chance.

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: A simple test with USEM https://elementscommunity.org/forum/index.php?topic=30432.msg403868#msg403868
« Reply #11 on: October 04, 2011, 04:56:11 am »
can you get it free somewhere? my professor made it seem like you have to pay a lot for it.. and its a very powerful tool :)used it in my class to help diagnose breast cancer patients based on raw data and had to improve it.. all the crazy math involved O_o
Free...no chance.
didnt think so.
~McPasty was here~

 

blarg: