PDA

View Full Version : opposition



van_man
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

Xull
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)

van_man
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
1->6= 1500
3 sets of doubles = 1500
triple 1=1000
triple 2=200
triple 3=0
triple 4=400
triple 5=500
triple 6=600
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
thanks

Xull
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:

van_man
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?

Xull
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:
http://www.winfxhearts.com/

this one might give a few ideas on how to set it up:
http://www.codeproject.com/csharp/freecellreader.asp

maybe sourceforge has something useful?
http://sourceforge.net/projects/hearts
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

van_man
21st March 2006, 01:22 AM
thanks heaps, i'll have a look and get back to u