As a French person I feel like it's my duty to explain strikes to you. - AdrienIer

Create an account  

 
MRGG update

(August 30th, 2014, 10:44)WhiteMage Wrote: Hi Tlaloc,
Maybe I can help you in your quest to generate the random generation algorithm. Please review mine, which I wrote 15 years ago and posted 4 years ago. See pseudocode at:

http://realmsbeyond.net/forums/showthrea...l#pid96181

To understand, it is best if you use the game and apply the code 'visually' to the user interface. Good luck,

Thank you WhiteMage for posting and sharing your algorithm. It's good to see I'm not alone in this endeavor. My background is also in Math and CSC and, interestingly enough, I also started developing my algorithm about 15 years ago since I wanted the extra challenge of a random MoM game.

I had a look at your algorithm and I quite like its simplicity. It's a lot simpler than MRGG and it could be used to generate a game without writing a computer program. I also like how it tends to generates multiple books of the same color, something which players generally like.

Perhaps the algorithm's biggest potential drawback is that the more expensive abilities (in terms of required books) such as Runemaster and Divine Power have a significantly lower chance of being picked than abilities such as Alchemy. This is because, as books and abilities get picked, abilities such as Runemaster and Divine Power become unpickable much sooner than Alchemy. MRGG deals with this problem by giving more expensive abilities such as Runemaster and Divine Power a higher chance of being picked while they are pickable.

The algorithm would also need to be modified so it couldn't pick both life and death books, and so that it couldn't pick Divine/Infernal Power if life/death books had already been chosen.

The algorithm also significantly devalues the Myrran ability since the chance of a Myrran race being chosen is about 36% when the Myrran ability is chosen. This chance is currently 86% with MRGG.

Have you implemented your algorithm and done a probability analysis on it? If you were to modify it to fix the life/death issue noted above, I'd be interesting in implementing it and comparing it to MRGG, which I've already extensively analyzed.

Cheers,
Tlaloc
Creator and maintainer of the Master of Magic Random Game Generator (MRGG)
Reply

(August 30th, 2014, 14:28)Tiltowait Wrote: Ah, well, that's not very random, then.

It is pseudo-random, as is every computer-generated mathematical randomization algorithm.
Creator and maintainer of the Master of Magic Random Game Generator (MRGG)
Reply

(August 30th, 2014, 15:16)Tlaloc Wrote: I wanted the extra challenge of a random MoM game.
Me too. That's what motivated me too back then. Instead of speculating what would make a hard game, I played many random games with this algorithm and made observations, which ones were hard. This led me to many surprising discoveries, which I would not have suspected before trying (such as the 11 black book wizard with wraiths, which blew my mind when I first found it). Plus a lot more fun than would have been possible otherwise.

(August 30th, 2014, 15:16)Tlaloc Wrote: I quite like its simplicity.
Yes, this was an important objective of mine, which makes tuning, corrections, and execution fast and errors less likely.

(August 30th, 2014, 15:16)Tlaloc Wrote: Perhaps the algorithm's biggest potential drawback is that the more expensive abilities (in terms of required books) such as Runemaster and Divine Power have a significantly lower chance of being picked than abilities such as Alchemy.
Yes, it has significantly lower chance, but I don't consider this a drawback. In my opinion a complex multi-prerequisite skill should happen with less probability, since it also generates books, which is somewhat redundant with the algorithm's other main method of generating books. So what to consider fully random is not an objective mathematical criterion, but a subjective one. In a random game P(runemaster) and P(alchemy) do not have to be equal. Same applies to skills, which require 2 picks vs. skills which require 1 pick. It should happen with less probability, since they are more expensive.

(August 30th, 2014, 15:16)Tlaloc Wrote: This is because, as books and abilities get picked, abilities such as Runemaster and Divine Power become unpickable much sooner than Alchemy.
Yes, but in the same time they increase the probability for other skills to be picked later.

(August 30th, 2014, 15:16)Tlaloc Wrote: MRGG deals with this problem by giving more expensive abilities such as Runemaster and Divine Power a higher chance of being picked while they are pickable.
So if there was a skill that requires 11 picks, then ideally it would be 11 times more likely to generate it than a 1 pick skill? Or if not 11 times more likely, then how many times more likely? Again, not random and is speculative, IMO.

(August 30th, 2014, 15:16)Tlaloc Wrote: The algorithm would also need to be modified so it couldn't pick both life and death books, and so that it couldn't pick Divine/Infernal Power if life/death books had already been chosen.
In my post I stated "if a random skill is too expensive to make it happen then reroll". Do the same for book. Yes, I did not spell it out for book. Thanks.

(August 30th, 2014, 15:16)Tlaloc Wrote: The algorithm also significantly devalues the Myrran ability since the chance of a Myrran race being chosen is about 36% when the Myrran ability is chosen.
Randomness and devaluation are 2 independent concepts. I wanted to develop a random game generator algorithm in order to play random games. Your objective is apparently a mixture of randomness with personal preferences.
I wanted to have equal chance for Klackon and Troll if I have Myrran. Otherwise, it is speculative why to increase the Myrran race's probability and to exactly what value. Also, Myrror is full of Myrran races. Capturing Myrror city is generally easy and I can spread them out with settlers. Also, some races have settler for 60 production cost, while other race for 180. Denying / significantly decreasing the probability of the 60 production cost settler (none of Myrror races have 60 cost) on Myrror is determinism, which is the opposite of randomness.

(August 30th, 2014, 15:16)Tlaloc Wrote: This chance is currently 86% with MRGG.
Why not 85%? Or 87% Choice is speculative and plays along the lines of personal preference, rather than randomness.

(August 30th, 2014, 15:16)Tlaloc Wrote: Have you implemented your algorithm and done a probability analysis on it?
No, and I am into more important development at this time (Beyond Beyaan).
Reply

Well it looks like we approached our algorithms from different starting points, which is fine. Yours reflects your personal preferences, as does mine. I do not consider mine to be less random because my preferences are different than yours. Yours is based mostly on the game menu and serves its purpose very well. I wanted one where I'd have equal chance to play with all the abilities, including the more expensive ones that I wouldn't usually pick on my own, and a higher chance to play with the more exotic Myrran races. Yes you can conquer Myrran races if you start with an Arcanus race on Myrror but it's still not the same as starting with one in terms of early development and unrest in conquered cities.

You asked me to review your algorithm so I did. I apologize if my review came across as critical. In any case you've given me some fresh ideas and helped me think outside the box I was in, so thanks for that. I remain interested in implementing and analyzing your algorithm and possibly incorporating some of your ideas into mine.

Cheers,
Tlaloc
Creator and maintainer of the Master of Magic Random Game Generator (MRGG)
Reply

(September 1st, 2014, 14:21)Tlaloc Wrote: You asked me to review your algorithm so I did. I apologize if my review came across as critical.
Thank you for reviewing and critiquing my algorithm. No need to apologize. This is what we do in science all the time. You did not hurt my feelings and I hope I did not hurt yours. I said what I thought was right for the sake of the algorithm. You did the same. This is all good. This moves research forward.

(September 1st, 2014, 14:21)Tlaloc Wrote: I remain interested in implementing and analyzing your algorithm and possibly incorporating some of your ideas into mine.
I would like to see you implementing my algorithm, which should be easy. Then you can do a probability analysis and report on both algorithms.
I think that the ultimate goal is increasing players' fun. So even randomness objective can be bent a little to serve this purpose. The original MOM game is not perfect. We are not required to be fixated on their version of the game.

So one easy method could be that once we have the probability reports, we individually tune our own algorithms then combine them into one by a simple 50%-50% choice of which algorithm to follow every time the main (combined) algorithm is called. By definition, this would serve my fun by 50% and yours by 50%. Also we can make all 3 available to the public and they are free to develop their own after that.

Keep up the good work. I am open for further discussions.
Reply

(September 1st, 2014, 16:06)WhiteMage Wrote: I would like to see you implementing my algorithm, which should be easy. Then you can do a probability analysis and report on both algorithms.

Great! I'm looking forward to implementing and analyzing your algorithm. I've written a wrapper to test my algorithm that I can run on yours as well. It generates a large number of games, compiles the statistical data from those games, and outputs the results. It outputs lots of different data, including:

Number of games generated
Number (and %) of games with x books (where x goes from 0 to 11)
Average number of books
Number (and %) of games with x book types (where x goes from 0 to 4)
Average number of book types
Average number of books per type
Book totals for each of the book types
% of games that have ability x (for each of the 18 abilities)

Is there any other statistical data you would like to see reported?

One other thing I should mention is that our algorithms also differ in book distribution. If you reroll to resolve life/death book conflicts, the % of life/death books generated over many games will be significantly less than the % of the other book types. This may not be an issue for you, but I decided that I wanted an equal distribution of books to get equal experience playing all the book types. So, in the case of a life/death book conflict, I just added the books to whichever type was picked first. (For example, if I picked 2 life books, then 5 death books, I would add the 5 books to life and get 7 life books)

(September 1st, 2014, 16:06)WhiteMage Wrote: I think that the ultimate goal is increasing players' fun. So even randomness objective can be bent a little to serve this purpose.

I completely agree.

(September 1st, 2014, 16:06)WhiteMage Wrote: So one easy method could be that once we have the probability reports, we individually tune our own algorithms then combine them into one by a simple 50%-50% choice of which algorithm to follow every time the main (combined) algorithm is called. By definition, this would serve my fun by 50% and yours by 50%. Also we can make all 3 available to the public and they are free to develop their own after that.

This sounds good. I can post all 3 on my website if you like once they're done. I should be able to finish implementing your algorithm sometime in the next month or so.
Creator and maintainer of the Master of Magic Random Game Generator (MRGG)
Reply

(September 2nd, 2014, 16:25)Tlaloc Wrote: Book totals for each of the book types
This is not clear to me. Do you mean total number of yellow, blue, green, white/black books over multiple games? That is good, but also report white and black separately.

Add:
1. Number (and %) of games with book color y (where y goes from 1 to 5).
2. Standard deviations for every average you calculate.
3. List 1 pick skills, 2 pick skills, 3 pick skills (given in MOM, not statistics).
4. Number (and %) of games including 0, 1, etc. 3 pick skill. Number (and %) of games including 0, 1, etc. 2 pick skill. Number (and %) of games including 0, 1, etc. 1 pick skill.

Make sure that your code is simple with minimal calculations and has no bugs. Make sure you use the random generator correctly. Check for end points so there will be no computational bias. Predetermine a large number and generate exactly that many games. Do not stop earlier and do not go further. I would say 100,000 games with both algorithms. Output to a file, probably a text file. Hopefully, your computer can finish a batch within 6 hours. Report raw data & statistics that was created by your program. We go from there.

I don't want to debug your code now nor your algorithm. I hope you do it correctly.

(September 2nd, 2014, 16:25)Tlaloc Wrote: % of games that have ability x (for each of the 18 abilities)
Add number too.

(September 2nd, 2014, 16:25)Tlaloc Wrote: One other thing I should mention is that our algorithms also differ in book distribution.
Let's see the statistics. I don't want to go into more theory now.

For more accurate probability distribution, please ignore the part of my algorithm which allows given wizard selection. Always generate custom wizard. As a special case, the given wizard may be randomly generated.
Reply

(September 2nd, 2014, 18:14)WhiteMage Wrote:
(September 2nd, 2014, 16:25)Tlaloc Wrote: Book totals for each of the book types
This is not clear to me. Do you mean total number of yellow, blue, green, white/black books over multiple games? That is good, but also report white and black separately.

Yes, total number of red/blue/green/white/black books over all the games, reported separately.

(September 2nd, 2014, 18:14)WhiteMage Wrote: Add:
1. Number (and %) of games with book color y (where y goes from 1 to 5).
2. Standard deviations for every average you calculate.
3. List 1 pick skills, 2 pick skills, 3 pick skills (given in MOM, not statistics).
4. Number (and %) of games including 0, 1, etc. 3 pick skill. Number (and %) of games including 0, 1, etc. 2 pick skill. Number (and %) of games including 0, 1, etc. 1 pick skill.

Will do. Could you please clarify #4? I'm not sure what you mean.

(September 2nd, 2014, 18:14)WhiteMage Wrote: I would say 100,000 games with both algorithms. Output to a file, probably a text file. Hopefully, your computer can finish a batch within 6 hours.

I usually generate 100000-300000 games when testing. It takes under 10s for my program to output results for 100000 games. I'd say 300000 games to be on the safe side.
Creator and maintainer of the Master of Magic Random Game Generator (MRGG)
Reply

(September 3rd, 2014, 15:01)Tlaloc Wrote: Could you please clarify #4?
List how many games had wizard with 0 of 1-pick skill (no 1-pick skill). How many games had exactly 1 of 1-pick skill. Exactly 2 of 1-pick skill. Etc. (E.g. Myrran is a 3-pick skill.) Clear? Also, exactly 1 of 1-pick skill with 1 of 2-pick skill…

(September 3rd, 2014, 15:01)Tlaloc Wrote: I usually generate 100000-300000 games when testing. It takes under 10s for my program to output results for 100000 games. I'd say 300000 games to be on the safe side.
If it is that fast, you shall go up to 1million. Power of 10 will allow easier human reading of results and spotting errors and outliers by eye. % will become easy to read, which is also a time saver.
Reply

(August 30th, 2014, 19:01)WhiteMage Wrote:
(August 30th, 2014, 15:16)Tlaloc Wrote: I wanted the extra challenge of a random MoM game.
Me too. That's what motivated me too back then. Instead of speculating what would make a hard game, I played many random games with this algorithm and made observations, which ones were hard. This led me to many surprising discoveries, which I would not have suspected before trying (such as the 11 black book wizard with wraiths, which blew my mind when I first found it). Plus a lot more fun than would have been possible otherwise.

Yes I read about the wraith strategy online and was also blown away when I tried it for the first time. What other discoveries did you make about what was hard or overpowered?
Creator and maintainer of the Master of Magic Random Game Generator (MRGG)
Reply



Forum Jump: