
-----------------------------------
Ayoun
Sun Mar 06, 2005 12:25 pm

Mr.Makenzie i need help on array- horse odds and betting
-----------------------------------
Sir i have no idea how to get different odds for each horse
Ayoun

-----------------------------------
person
Sun Mar 06, 2005 1:42 pm


-----------------------------------
ok...even though im not mackenzie i actually did a horse betting game (its in the submissions area)...can u be a little more specific with ur question because id like to help

-----------------------------------
Ayoun
Sun Mar 06, 2005 3:06 pm

Reply
-----------------------------------
ok you know when we are suppost to make a horse race with each horse having a different odd of winning a game. yeah i dont know how to cange the odds for each horse, right not each horse has a 1 in 6 chances of winning a race. in total there are 6 horses

-----------------------------------
Flikerator
Sun Mar 06, 2005 3:14 pm


-----------------------------------
If you wanted to ask mackenzie, send him a pm?

I havnt made a horse betting program, but it doesnt seem that difficult. Just use Rand.Int or something. Im not entirely sure what you want (so I cant give suggestions), but if you need any help with something just ask. Its helpful if you also post the code you need help with.

-----------------------------------
McKenzie
Sun Mar 06, 2005 4:16 pm


-----------------------------------
PM might be the best way to handle this, but There may be others who are asking themselves the same question. 

So I've decided to run Starcraft after school again. This time I'm doing it as a way to make some extra money  by setting up a gambling house. In order for the betting odds to be fair I need to do some testing.  I take my players, lets say Andy, Raymond, AsianSensation, Bugz and "make" them play 100 games.  I then tally the wins. 

Name            Wins    
-----------------------------
Andy :          25          
Raymond:        45          
AsianSensation: 25           
Bugz:            5          
As you can see, on average Andy wins 1 in every 4 game.  If someone were to bet on Andy I should pay them $4 for every $1 they bet (if I was totally fair). So my chart would look like:

Name            Wins    100 div Wins (pay rate)
-------------------------------------------
Andy :          25           4
Raymond:        45           2
AsianSensation: 25           4
Bugz:            5          20
In this example I would be making money on the round-off error because even though Raymond wins less than one in every two that is the pay rate.

Obviously the same principle applies to your horse racing.  First figure out some way of advancing your horses so that each horse has a different chance of winning. Once you have done this run your program 1000 times (without graphics) and count how many times each horse wins.  Compute 1000 div wins and you will have your pay rates.  PM me your code if you are still confused and I will set you in the right direction.

-----------------------------------
person
Sun Mar 06, 2005 6:15 pm


-----------------------------------
wat u can do is do this:


loop
       a:=Rand.Int (1..10)
       b:=Rand.Int (1..20)
       c:=Rand.Int (1..30)
       drawdot (1+a,10,1)
       drawdot (1+b,20,1)
       drawdot (1+c,30,1)
end loop


-----------------------------------
McKenzie
Sun Mar 06, 2005 6:39 pm


-----------------------------------
Ignoring all of the obvious errors in the code the problem with that is c would always win the race.

-----------------------------------
person
Sun Mar 06, 2005 6:45 pm


-----------------------------------
not really and any ways my numbers r a little exagerated

-----------------------------------
McKenzie
Sun Mar 06, 2005 7:04 pm


-----------------------------------
Even if you change the range to say (1,10), (1,11), (1,12) a will win about 1%, b about 19% and c about 80%.  This is on a 500 pixel long track.  The odds get worse as the track gets longer obviously.

-----------------------------------
Andy
Sun Mar 06, 2005 7:11 pm


-----------------------------------
what?? i am teh pwnzord by raymond?? thats it.. time to practice lol

-----------------------------------
person
Sun Mar 06, 2005 7:41 pm


-----------------------------------
u can have a constant Randint and a none constant one
