View Full Version : opposition
18th March 2006, 09:52 PM
im doin yr12 software design and development.
im no programming wizz and was wondering if any one could help me with the programming of opposition players in a dice game.
its much like hearts, where u play against 3 computer players and yourself.
i would like it so that each oppostion player had there own characteristics, ie one player would be really conservative and another go for broke.
any help would be much appreciated
18th March 2006, 11:12 PM
Well, more specifics on the rules would be helpful ;)
But in terms of generalities...
Say the object is to get to a certain number without passing it... a simple way you could get the different characteristics would be by having each computer player operate at different risk levels based on probability...
like for example, the conservative one would only go if the chances of overshooting are minimal (or none for an extreme case); other players could be set at higher probabilities of failure for them to take more chances (or lower success, however you set it up :P)
19th March 2006, 10:52 PM
thats a good idea, cheers
the rules are(simplified):
aim is to roll 10,000 points
this can be achieved by rolling 6 dice in variouse combinations. these are:
a single 1=100p
a single 5=50p
any other singles=0
3 sets of doubles = 1500
with each roll of the same no. dice adding on the same score. eg 3 5's then rolling another 5 would make score 1000
u can continue rolling the dice till u get a score of zero. on your third roll of zero u lose 1000 points.
u must pass 350 to score, and 500 to get on the board
i think thats most of the rules, although im sure i have forgotten some. i hope that helps with ur advice
20th March 2006, 05:24 PM
well... that helps explain some of the scoring, but it says nothing of choices (unless i missed something :P)
If there isn't any way to influence the game, it isn't exactly easy to get different players to play differently :heh:
though I suppose you could have some players be more "verbal" with the results than others :tongue:
20th March 2006, 10:43 PM
well to do with choices:
u can choose to keep rolling after u pass 350, u can choose to keep triples or say a single one.
so say an aggresive person would roll or take more risks than a conservative person.
do u no where i can find the code for hearts?
20th March 2006, 11:14 PM
Can't say it'd be simple enough to work with, but first thing that came up in a search:
this one might give a few ideas on how to set it up:
maybe sourceforge has something useful?
there were some other similar projects too in case you're interested: http://sourceforge.net/search/?words=hearts&type_of_search=soft
couldn't find much more on the main sites :-/ at least not on the first page :P
21st March 2006, 01:22 AM
thanks heaps, i'll have a look and get back to u