|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#46
|
|||
|
|||
|
[Risk] RE: Risk
Risk sounds like a good idea, looking at the interim description.
I think a future PHP contest should be to design a PHP script that, given a text description of a person's face, can use GD to draw what the face looks like, just like a professional criminal sketch-person would. |
|
#47
|
|||
|
|||
|
[Risk] RE: Risk
Happylight,
Not everyone will necessarily be getting the bonus soldiers on the same turn. You have to take over a country in order to get a bonus token, and not everyone will be able to do this. ;-) |
|
#48
|
|||
|
|||
|
[Risk] RE: Risk
I like the idea of lefty: storing the data in a text file.
Now my comment on the formulas: la = Loss Attacker ld = Loss Defender a = Armies Attacker d = Armies Defender la = round( (0.85d^2)/a ) // Little simplified without the min(); 0.5 results in no losses at all: 0.5 < (0.85d^2)/a) 0.5 = (0.85d^2)/a) 0.85d^2 = 0.5a 1.7d^2 = a // Break-even So if the defender has 5 armies, the attacker needs 1.7*5^2 = 1.7*25 = 42.5 = 43 armies if he doesn't want to loose any armies. So theoraticly it's possible an attacker does not lose any armies. Sounds a little bit strange to me... I'd say: Use that formula with a miminum losses of 1 armie |
|
#49
|
|||
|
|||
|
[Risk] RE: Risk
I think that this will be a viable contest.
I have a question. What if a proxy-script makes it past the first round? |
|
#50
|
|||
|
|||
|
[Risk] RE: Risk
I had a quick look to the interim rules and it seems really interesting... I just hope to find some time to code my script
Great work, xs0 |
|
#51
|
|||
|
|||
|
[Risk] RE: Risk
XS0: I think the rules should be altered a little bit. On the first turn there are three GET parameters: youare, start and board:
If a territory is unoccupied the value of that territory will be x. To my mind the value should be the letter of the controller without a number of armies. So the script with letter A knows which territories belong to which player. It's important to know because of placing the 20 soldiers... Do you get my point? |
|
#52
|
||||||||
|
||||||||
|
[Risk] RE: Risk
Quote:
That's exactly what I don't want.. I want it to be simple to implement one's strategy, which it is not, when the problem is generic (i.e. it is unknown what the board will be like). I think this will lead to more interesting games, because strategies will be more evolved. I even deleted two lands, so you always start with 10 Quote:
Well, I think that luck can really ruin your day, when you don't have it. And it's not that realistic. I often play Risk with my computer, and it is really stupid that sometimes you attack 20 to 5 and manage not to win... But anyway, the main idea about the formulas is that the scripts don't get called for each little attack, but only once for each turn. Quote:
Well, I though about this quite a lot, but decided against it. First, the whole idea with the original game is to wait for a better combo of cards, which can't happen here. Second, it would add an otherwise really unneccesary command. Third, theoretically it's not very important - the rules are the same for all players, so it doesn't make a big difference overall. Quote:
Well, if you consider that each soldier-piece can represent, say, 1000 troops, it's not that unrealistic. If the losses are spread over the 43 armies, after rounding Quote:
It can't. It doesn't actually receive any points, just fills a place on the ladder. Quote:
AFAIK, there are variants on this, but the reason I decided on this particular variation is because the first player has an important advantage throughout the game (first to attack, first to get bonus soldiers, etc.). This is his disadvantage. Well, it seems most people like the idea, so we'll make this the contest. I'll talk with Matt and it should get on the official page soon. |
|
#53
|
|||
|
|||
|
[Risk] RE: Risk
Jorgen, seriously, I don't want to start an off-topic discussion but I think that chess is a little more complicated than you presume. And it takes years to know the game pretty well.
If you know the moves of the pieces and the rules of the game you will find that although there are simple defensive and offensive strategies, all of them without fail are ineffective against more complicated, less intuitive strategies, which are virtually inexhaustible in number. Assigning value to pieces does not simply require knowing their positions and piece-types but also their possible positions for n moves (until checkmate) in the future. There is only one piece of value in the game, the rest are limbs. There is no requirement to win the fight with all or any of your limbs. I want to suggest chess for the contest, perhaps so that this point can be illustrated. Coding a perfect chess game is impossible with today's technology. Perhaps if the board and pieces were reduced (say 5x5, no knights, no bishops) it would be less horrifying a concept. But anyhow.... the risk game issue: Will someone please tell me HOW the formulas will work? Perhaps post one? How come nobody else seems to think that this is an important factor? |
|
#54
|
|||
|
|||
|
[Risk] RE: Risk
Formulas for the battles?
// $atts is the number of attackers // $defs is the number of defenders $loss_attacker=min($atts, round(0.85*$defs*$defs/$atts)); $loss_defender=min($defs, round(0.65*$atts*$atts/$defs)); Check xs0's interim rules above. |
|
#55
|
|||
|
|||
|
[Risk] RE: Risk
The defender always defends with all soldiers. Let's say he has 5. You have 30 soldiers on a neighbouring territory. You can attack with anywhere from 1 to 29 soldiers.
If you attack with 5: loss_attacker=round(0.85*5*5/5)=4 loss_defender=round(0.65*5*5/5)=3 So you will lose 4, and the defender 3, so defender will then have 2 and you will have 26 soldiers. If you attack with 6: loss_attacker=round(0.85*5*5/6)=4 loss_defender=round(0.65*6*6/5)=5 So you will also lose 4, but the defender will lose all 5, so on your original territory you will have 24 and on the conquered territory you will have 2 soldiers. If you attack with 29, you will only lose 1, and 28 will move to the new territory. |
|
#56
|
|||
|
|||
|
[Risk] RE: Risk
can i attack from territory i just conqured in this turn
|
|
#57
|
|||
|
|||
|
[Risk] RE: Risk
Yes, you can
|
|
#58
|
|||
|
|||
|
[Risk] RE: Risk
Let's get this show on the road.
|
|
#59
|
|||
|
|||
|
[Risk] RE: Risk
what if i attack with 10 and defender has 10, i lose 9 and defender loses 3, does 1 soldier comes back to land i am attacking from or what??
|
|
#60
|
|||
|
|||
|
[Risk] RE: RE: Risk
Quote:
In that case, you lose 9, defender loses 7, and 1 soldier stays where he is. |
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Older Contests > [Risk] Risk |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|