zachanassian / tu_optimize

Tyrant Unleashed Optimizer
http://zachanassian.github.io/tu_optimize/
Other
8 stars 14 forks source link

One climb/reorder for more than one test type #18

Open aember opened 10 years ago

aember commented 10 years ago

So called Ultimate Gauntlet (Standard UG or 100k UG) score has become quite popular in the TU world as a general indication of a deck's strength. Maybe because of the simplicity - one number describing many aspects of the deck.

Is it possible to make the climb and reorder functions to optimize not only one aspect (e.g. surge attack) but many aspects (e.g. average or sum of both surge attack and surge defense)?

I imagine it would require running N tests per trial, where N is the number of aspects tested, and then averaging/adding all results before comparing to the current maximum.

zachanassian commented 10 years ago

There are some gauntlet decks now in customdecks_template. Are these the same decks you are referring to? If yes how exactly is ultimate gauntlet calculated?

aember commented 10 years ago

Yes, those are the decksets. Without them it would be kinda pointless :) The calculation was just an arithmetic mean of the four tests, as in the screenshot: http://i.imgur.com/BwP8Xqs.png

I think it's also what was already suggested in the forum thread here: http://www.kongregate.com/forums/338-tyrant-unleashed/topics/390807-sim-tyrant-unleashed-optimizer?page=2#posts-7910845

zachanassian commented 10 years ago

Ok screenshot was very helpful. It is just average % * 10. Calculate the value for a given deck sounds easy. But I will not add automatic optimizing of gauntlet score.

aember commented 10 years ago

In fact no-one cares for the multiplication by 10, as it is not very hard to do in one's head :P Changing of the way to present the score was not my point in fact.

Currently the optimisation is one way or the other, let's you build the best deck for PvP attack, PvP defense, Guild War attack or GW defense... there's no possibility to optimise a deck that is all-around good. That's why I suggested averaging of several test results for each trial.

What I woud LOVE to have would be a way to automatically optimize a deck using a weighted mean of all four aspects, with the possibility to modify the coefficients for each (zero including). But I wanted to start small, that's why my current proposal is simpler.

Care to tell me why you won't do it? Too complicated? Not enough time? Not useful enough? Thanks!

zachanassian commented 10 years ago

Don't get me wrong. I always read in the forum about gauntlet score of 720 and I really did not know that it is just 72%*10.

The simulation part is easy. Idea would be something like this tu_optimize mydeck gauntlet overallscore

Adding this logic to the climb is a lot more work and I do not have the time. It can be done. Sure. But at least for me the average best deck is not so interesting. I am always optimizing my deck for a given purpose and switch decks quite often. But I see where you are coming from and I will keep it in the backlog so somebody else might pick up the task.

One additional question: For Standard(Atk) Standard(Def) Surge(Atk) Surge(Def) all decks (enemy and my) are played in random order?

aember commented 10 years ago

Oh, OK about the multiplication, I understand now. I also understand your approach, switching decks works best, but for most people it's a chore.

There is a toggle to make the test with autoplay or ordered play. The defender always plays auto - of course.

Below is an example on how Rbwabd's Excel frontend batch-runs tu_optimize to generate the Ultimate Gauntlet (all four aspects) result for one deck. First 4 calls copied (std atk, std def, surge atk, surge def - for the first deck from the set, other decks are analogical) for each mode (manual/auto). He flips the attacker and defender for the defense test, I guess it can be done easier with correct flags, as per your examples on website. As Rbwabd left the game, there will be no more updates on his tool though.

Anyway, I want to congratulate you on a job well done!

ORDERED

echo sim #1/380 tu_optimize.exe "[1192],[5160],[4506],[5443],[130],[4705],[4823]" "[1192],[4080],[4554],[484],[714],[4560],[467],[4572]" -r sim 2000 >> TOsimoutput.txt echo sim #2/380 tu_optimize.exe "[1192],[4080],[4554],[484],[714],[4560],[467],[4572]" "[1192],[5160],[4506],[5443],[130],[4705],[4823]" -r sim 2000 >> TOsimoutput.txt echo sim #3/380 tu_optimize.exe "[1192],[5160],[4506],[5443],[130],[4705],[4823]" "[1192],[4080],[4554],[484],[714],[4560],[467],[4572]" -r -s sim 2000 >> TOsimoutput.txt echo sim #4/380 tu_optimize.exe "[1192],[4080],[4554],[484],[714],[4560],[467],[4572]" "[1192],[5160],[4506],[5443],[130],[4705],[4823]" -r -s sim 2000 >> TOsimoutput.txt

RANDOM

echo sim #1/380 tu_optimize.exe "[1192],[5160],[4506],[5443],[130],[4705],[4823],[5508]" "[1192],[4080],[4554],[484],[714],[4560],[467],[4572]" sim 2000 >> TOsimoutput.txt echo sim #2/380 tu_optimize.exe "[1192],[4080],[4554],[484],[714],[4560],[467],[4572]" "[1192],[5160],[4506],[5443],[130],[4705],[4823],[5508]" sim 2000 >> TOsimoutput.txt echo sim #3/380 tu_optimize.exe "[1192],[5160],[4506],[5443],[130],[4705],[4823],[5508]" "[1192],[4080],[4554],[484],[714],[4560],[467],[4572]" -s sim 2000 >> TOsimoutput.txt echo sim #4/380 tu_optimize.exe "[1192],[4080],[4554],[484],[714],[4560],[467],[4572]" "[1192],[5160],[4506],[5443],[130],[4705],[4823],[5508]" -s sim 2000 >> TOsimoutput.txt

zachanassian commented 10 years ago

Was not aware that Rbwabd left the game. That is bad news.

One (hopefully) last Question. If gauntlet score calculation is switched to ordered and Standard(Def) is calculated are all gauntlet decks then played ordered?

aember commented 10 years ago

Bad indeed. Watching his farewell video made me die a little... https://www.youtube.com/watch?v=gPozr4RGgLI

Std def for "normal" setting is: tu_optimize.exe gauntletdeck_N mydeck -r sim 2000 for "random" setting it's: tu_optimize.exe gauntletdeck_N mydeck sim 2000

So it seems the normal/random setting applies not only to tested deck attacking the gauntlet deck (for atk) but also to the gauntlet deck that is attacking us (for def).

I have no problem with the questions, ask away!

zachanassian commented 10 years ago

Ok requirement is now clear. It would be two options tu_optimize mydeck edecks gauntletscore:random tu_optimize mydeck edecks gauntletscore:ordered would at least allow to get the score for a given deck w/o manually calculating anything.

aember commented 10 years ago

Yeah, I guess this sums it up nicely. Then if the formula needs to be modified (averaging method) or improved (coefficients etc.) it can be continued. I hope this idea can be put into effect sometime. Thanks!

zachanassian commented 10 years ago

Couettos made clear that calculating the score is not enough. Deck should really be optimized for both defense and attack at the same time b/c "Concerning the deck switch, as the whole war is determined in the first 3 minutes, I am concerned the surge atk deck might be defending a lot…"

However it is still unclear which metric to use to optimize both. Assume deck A 20% win on attack and 70% on defense. And deck B has 0% win on attack and 100% on defense then with a simple metric A(20+70) < B(0+100). But is B really "better" then A???

aember commented 10 years ago

Yup, my point exactly. Calculating the score is irrelevant, formula-optimizing is what's interesting.

I totally agree with your doubts, oldschool UG is just (att+def+satt+sdef)/4, but I think a lot more useful and flexible would be to have it as a parameter. Or 4 in fact: (k_att+l_def+m_satt+n_sdef)/(k+l+m+n) and optimize per this value.

Still, can be lots of stuff to program. But it's your call I guess :)

acouette commented 10 years ago

Hi guys, I am Couettos from TU forum. Thank you for considering the idea. Concerning the metric : I am in a top guild and we heavily rely on a (atk+def)/2 version of the excel sheet. Both are equally important in our opinion, because in average, you will get as much attacked than you will attack.

For me, this answers your question zachanassian. If you consider the gautlet decks your opponents at war, on a score perspective and in average, B is "better" than A.