Fun Game Simluation 

What is the fun game?

Mr E and Mark are playing a game in which a fair coin is tossed until either HHH comes up in which case Mr E wins, or HTH, in which case Mark wins.

The first problem is to determine who is more likely to win - and to get some sort of numerical answer. This could be tried by using an exhaustive mathematical proof, or by creating a 'fun game simulation' in which the game is played many times by the computer, and after many games, the proportion of total game won by each will tend towards a particular fraction. 

The second part of the problem is the question of how to bias the coin so that (if the outcome was not equal in part one) each player stands the same chance of winning.

My solution is in empirical mathematics, and is found somewhat in FGS. However, if you can come up with a mathematical proof, or a more elegant program for optimisation of the bias etc. then please contact me if you wish to place a link / upload it to this site for the whole world to see. We need a definitive answer! You can help!

FGS

FGS is made in MS QuickBasic, simply for ease of making - although it isn't the fastest language in the game. 

FGS_v1

The original problem solving algorithm with a very basic user interface - allows setting of number of games. 

FGS_v2 (current version)

This release introduced the ability to bias the coin. It has a slightly more intuitive user interface, although still a little rough on the edges.

FGS_v3 (future release)

This has already been made once, but will be completely rewritten. It is made to solve the second half of the problem - by a process of optimisation. It performs an exhaustive search of the values for a bias given an upper and lower bound and search 'resolution'.

Notes

FGS is made by Christian Brown - and is open source - feel free to edit it and redistribute - but always keep a link to this page attached. Better still, email your new version / url to me and I'll upload it and / or make a link to your page.

Update

A solution has been sent in and can be found here.

Downloads:

 

FGS_v2: (current version) 

FGS_v2 (win32 .exe) 

FGS_v2 (Source .bas) 

 

FGS_v1:

FGS_v1 (win32 .exe)

FGS_v1 (source .bas)