Page 1 of 1

Simulate to determine overal strength

PostPosted: 03 Nov 2011, 09:46
by shogi4fun
Hi,

do you think, writing all feature requests in the thread Feature requests would be the best?

I personaly would prefere to write each (at least almost each, similar requests could be collected) request in an own thread, so it's more "sorted", you can recognize new requests easier, speak/read/write about only about that one you are interested in and discuss it in one straight line, without interrupting of discussion of other threats.
(And still the Magarena-forum is not big at the moment.)

So I write my request here. :twisted:
(Of course if you prefere it other, I will do it next time into Feature requests.)

There is a (VERY NICE) feature of determining the strength of two decks in a duel by simulating a lot of games.

How about a feature of determining the OVERAL strength of a deck?
How it could be realized - maybe you like to know? :wink:

My idea is the following:
in the part where you setup the count of games to simulate and start the simulation, there would be needed only one more checkbox, named maybe "all decks" (or "overal" or something else)
functionality (when this box is checked):
the simulation should be done as usual, but after it is finished, it should load the next deck (from the used deck-directory) for the opponent, and continue the simulation.
And continue, till the simulation were done with all decks (for the opponent only - of course).

Yes, I know, the simulation would be took a huge time and probably it should be done "over night".
(Maybe you can reduce the simulation number, because playing against different decks give also good estimation.)

"Simple" continue the simulation should be the first (minimum) part, but (as I'd told in an other thread) I would like to receive as many info as possible.
So I would like not only the "final" result, but also the results of each deck.
At the screen, maybe shown a text-window, where the last line could be look like:
Playing against "Elves.dec": 12/100 - 75%
(meaning 12 games played of 100, 75% victory).
On the screen this (last) line should be best replaced, till it's finished, so maybe you will see:
Playing against "Affinity.dec": 65%
Playing against "Blue_Power.dec": 42%
Playing against "DL_Burn.dec": 48%
Playing against "Elves.dec": 12/100 - 75%

Maybe this feature could also be used to create puzzles in that way, that you get the information, that an mainly strong deck has problems with this or that opponent-deck. So maybe a puzzle could be interested, how to beat that one. :wink:

Ohhh, and if you don't know what you can do in your sparetime and like to code all your time ... 8)
It would be much more nice, if only ONE game will be played against one deck, THEN immediately load the next deck and after finished ALL decks, continue with first deck.
=> in this situation, you will get an overview of the result and so could set the simulation-count to a very high (or infinite) number and stop when you like.

That's for all,

Bernhard

Re: Simulate to determine overal strength

PostPosted: 03 Nov 2011, 11:11
by beholder
The deck strength panel would need some more changes than the ones you describe, but nothing too complicated I think. You can already choose how many games are simulated, so playing just one game needs no change at all.
A list of all the results would be pretty long and needs its own panel. A "show results" button might be a solution?
Overall, I like the idea.

Hmm, it actually looks like a cool thing for you to add to the code. What do you think? :)

Re: Simulate to determine overal strength

PostPosted: 03 Nov 2011, 11:30
by shogi4fun
beholder wrote:The deck strength panel would need some more changes than the ones you describe, but nothing too complicated I think.
Fine. :D
You can already choose how many games are simulated, so playing just one game needs no change at all.
Little missunderstanding:
I meant in this case like step.
So instead for example simulate 100 games with the first deck, than 100 games with the second, do simulate all decks one after each other and repeat this 100 times.
:arrow: so the number of simulation mustn't be 1, because it would finish after first round.
Hmm, maybe also other steps are interesting???
For example play 10 games against the first deck, than 10 games against the second and so on and start with games 11-20 after all decks are finished. Only saying my thoughts, but I believe this wouldn't be needed, but step 1 would be nice. :wink:
A list of all the results would be pretty long
Scrollbar? :wink:
and needs its own panel.
Yes, I thought so.

(Still also writing into log-file would be a sollution, if this details are rarely of interests for most persons.)
A "show results" button might be a solution?
Of course.
Or maybe show directly the result - one percent value - and have a button "show details". :wink:
Overall, I like the idea.
Thanks.

Hmm, it actually looks like a cool thing for you to add to the code. What do you think? :)
I'm afraid that would need a muuuuuuuuuuch deeper insight into the code. Still I'd thought about it, but at the moment I reject it.

Re: Simulate to determine overal strength

PostPosted: 03 Nov 2011, 14:37
by beholder
shogi4fun wrote:... simulate all decks one after each other and repeat this 100 times.
That is what I meant, I just wasn't very clear.

shogi4fun wrote:I'm afraid that would need a muuuuuuuuuuch deeper insight into the code. Still I'd thought about it, but at the moment I reject it.
Hahaha :lol: , well there's no deadline. You can start on different things and then try changing the deck strength thing when you feel ready. I know it's hard starting work on somebody else's code. There are lots of parts I still not understand at all or not well enough to even attempt changing something about it.

Re: Simulate to determine overal strength

PostPosted: 08 Nov 2011, 20:57
by shogi4fun
beholder wrote:I know it's hard starting work on somebody else's code.
It seems, it's much easier to understand the code of Magarena, than understandiny my own code of any program which I hadn't looked for about 6 month. :lol: :lol: :lol:

Still Magarena is written very well. =D> I found the way to load a deck (still a construct like "findfirst ... findnext" for finding the next file of one directory would be needed to know). Also I found the position where a simulated round is finished, so simply at that position loading the next deck SEEMS very simple.

But the advantage of object orientated code is also the (my) dissadvantage: how get access to the needed part?

Nevertheless, I still think, that I should use my time for other more efficience things. :wink: