Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

RE: Intriguing idea: Hiding the rolls

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Empires in Arms the Napoleonic Wars of 1805 - 1815 >> RE: Intriguing idea: Hiding the rolls Page: <<   < prev  1 [2]
Login
Message << Older Topic   Newer Topic >>
RE: Intriguing idea: Hiding the rolls - 7/31/2009 7:38:59 PM   
Jimmer

 

Posts: 1968
Joined: 12/5/2007
Status: offline

quote:

ORIGINAL: Marshall Ellis

Baby steps ... :-0!

I have coded the following today for inclusion into 1.07.00:

All die rolls, casualties, morale losses, and the factors to eliminate are hidden until the attacker is choosing his causalties from the first round! I am writing the pre-rolled dice function as we speak.

SO, this is how it will work:

Attacker pick chit
<send to defender>
defender pick chit
<send to attacker>
Attacker gets file and sees 1st round results.
choose casualties
<send to defender>
Defender sees 1st round results
choose casualties
<send to attacker>
repeat until end.

I have also found several battle file cleaning issues that I am working on!

Question: Is there any reason that the pre-rolled dice could not be implemented across the board (Non PBEM games as well)?

Once the 1.06 general release is out then I will post a 1.07 BETA quickly (After my testers have played with it a bit) so that you guys can try this...

Thoughts?




Looks good to me!

_____________________________

At LAST! The greatest campaign board game of all time is finally available for the PC. Can my old heart stand the strain?

(in reply to Marshall Ellis)
Post #: 31
RE: Intriguing idea: Hiding the rolls - 7/31/2009 8:38:36 PM   
Mardonius


Posts: 654
Joined: 4/9/2007
From: East Coast
Status: offline
Looks great in concept.

(in reply to Jimmer)
Post #: 32
RE: Intriguing idea: Hiding the rolls - 7/31/2009 8:55:47 PM   
Marshall Ellis


Posts: 5630
Joined: 10/2/2001
From: Dallas
Status: offline
UPDATE!

I have coded the pre-rolls and run them through some PBEM battle tests and it looks OK so far!
I have individually rolled attacks, artillery, pursuit, withdraws, flank attempts, guard committment and reinforcement. This isolates everything so that no roll changes based on the order something is done. It looks like this was a good idea! :-)



_____________________________

Thank you

Marshall Ellis
Outflank Strategy War Games



(in reply to Mardonius)
Post #: 33
RE: Intriguing idea: Hiding the rolls - 8/1/2009 2:38:33 AM   
Dancing Bear

 

Posts: 1003
Joined: 2/21/2008
Status: offline
Excellent! Any progress with the hiding the chit choices?

(in reply to Marshall Ellis)
Post #: 34
RE: Intriguing idea: Hiding the rolls - 8/13/2009 12:54:30 PM   
Marshall Ellis


Posts: 5630
Joined: 10/2/2001
From: Dallas
Status: offline
They are hidden now (BIG EXHALE). That code was a little tougher than I thought LOL!
They are hidden until the attacker if first taking casualties. The simple way to think of this is that nothing is revealed until the attacker is removing casualties from the very first die roll.



_____________________________

Thank you

Marshall Ellis
Outflank Strategy War Games



(in reply to Dancing Bear)
Post #: 35
RE: Intriguing idea: Hiding the rolls - 8/13/2009 1:32:15 PM   
Mardonius


Posts: 654
Joined: 4/9/2007
From: East Coast
Status: offline
This is good news. We have been using an outside server to roll big die rolls (outflank, reinforce, withdraw) but this can get very cumbersome when dealing with single-round multivariate situations. Hiding the rolls and chit choices while allowing for needed intelligence for things like guard commitment decisions (btw how do you incorporate this?) and reinforcement decisions seems to be the best answer.

_____________________________

"Crisis is the rallying cry of the tyrant" -- James Madison
"Yes, you will win most battles, but if you loose to me you will loose oh so badly that it causes me pain (chortle) just to think of it" - P. Khan

(in reply to Marshall Ellis)
Post #: 36
RE: Intriguing idea: Hiding the rolls - 8/13/2009 8:45:04 PM   
Jimmer

 

Posts: 1968
Joined: 12/5/2007
Status: offline

quote:

ORIGINAL: Mardonius

This is good news. We have been using an outside server to roll big die rolls (outflank, reinforce, withdraw) but this can get very cumbersome when dealing with single-round multivariate situations. Hiding the rolls and chit choices while allowing for needed intelligence for things like guard commitment decisions (btw how do you incorporate this?) and reinforcement decisions seems to be the best answer.

Check back to some of the previous posts, but ...

Guard, artillery, and reinforcment all occur after one knows the PREVIOUS round's die rolls. What is being hidden is knowing the results while you are still looking at the combat screen for the same round in which they are rolled.

In other words, you see the results of round 1 at the beginning of your round 2, and round 2's results at the beginning of 3. (Although, Marshall may have only implemented them for the first round -- we deemed that the most critical.)

One other thing he was going to do was to pre-roll all of the rolls when the battle is generated. What's being hidden are the results of those rolls (until the appropriate time). Not sure if he did this as well or not.

_____________________________

At LAST! The greatest campaign board game of all time is finally available for the PC. Can my old heart stand the strain?

(in reply to Mardonius)
Post #: 37
RE: Intriguing idea: Hiding the rolls - 8/14/2009 1:33:48 PM   
Mardonius


Posts: 654
Joined: 4/9/2007
From: East Coast
Status: offline
Thanks Jimmer

_____________________________

"Crisis is the rallying cry of the tyrant" -- James Madison
"Yes, you will win most battles, but if you loose to me you will loose oh so badly that it causes me pain (chortle) just to think of it" - P. Khan

(in reply to Jimmer)
Post #: 38
RE: Intriguing idea: Hiding the rolls - 8/14/2009 2:08:40 PM   
Marshall Ellis


Posts: 5630
Joined: 10/2/2001
From: Dallas
Status: offline
All rolls are pre-rolled individually so you reinf, commit the guards, artillery, etc. are all separately rolled so there should be no difference in any type of ordering!

Make sense?



_____________________________

Thank you

Marshall Ellis
Outflank Strategy War Games



(in reply to Mardonius)
Post #: 39
RE: Intriguing idea: Hiding the rolls - 8/14/2009 5:23:11 PM   
Mardonius


Posts: 654
Joined: 4/9/2007
From: East Coast
Status: offline
Sounds great!

_____________________________

"Crisis is the rallying cry of the tyrant" -- James Madison
"Yes, you will win most battles, but if you loose to me you will loose oh so badly that it causes me pain (chortle) just to think of it" - P. Khan

(in reply to Marshall Ellis)
Post #: 40
RE: Intriguing idea: Hiding the rolls - 8/14/2009 6:13:10 PM   
eske

 

Posts: 258
Joined: 1/2/2008
Status: offline
This does appear to be the answer to a lot of prayers

However - without having studied this thread from the start - can you tell me it is not possible to test the pre-rolled die-rolls, and make battle decisions based on it ??

For instance run this round two of a battle - see that opponent almost breaks - then reload the game. This time decide to commit my guard and re-run round two and now he breaks.... ?

Oh, and does this feature also apply to naval battles ??

/eske

< Message edited by eske -- 8/14/2009 6:14:13 PM >


_____________________________

Alea iacta est

(in reply to Mardonius)
Post #: 41
RE: Intriguing idea: Hiding the rolls - 8/14/2009 7:19:16 PM   
Jimmer

 

Posts: 1968
Joined: 12/5/2007
Status: offline

quote:

ORIGINAL: Marshall Ellis

All rolls are pre-rolled individually so you reinf, commit the guards, artillery, etc. are all separately rolled so there should be no difference in any type of ordering!

Make sense?



I just thought of a possible programming issue with this:

Randomization is not truly random, but pseudo-random. This you know, of course, but what you may not know is that typical random number algorithms are actually one element in a very long sequence of numbers. This sequence can be repeated if one knows the algorithm and the seed value.

Because it is a sequence, there is a small tendency to have one number be "far" from the next number in the sequence. It's just a fact of life based on the algorithm.

In a typical game environment, this doesn't matter because the seed keeps getting changed (usually based on the computer's microsecond clock or some other semi-random value).

BUT, when you gather a long string of pseudo-random numbers one right after another, it is possible to set up a harmonic that effectively renders the numbers only partially random.

The solution is to randomize the choices as you calculate them. Pseudocode:

1) Generate first game random number needed
2) Generate a collection of random numbers, the number generated being the final digit of the computer's oscillator clock. (see below)
3) Generate next game random number needed
4) Repeat steps 2-3 as often as needed.

The key is #2. What you do is pick a truly random number, specifically the nth digit of the clock (typically the last digit, since it varies the most). This number (a digit from zero to 9) becomes the number of next random rolls you will simply not use. Then, after skipping over that many rolls, you generate the next number which you WILL use.

I've put this into high-usage randomization routines I've written, and it seems to completely remove any harmonics that may have otherwise shown up in the random number list. It's possible the database's randomizer already does something like this, but unless you know that for sure, I recommend adding the above pseudocode. It's very easy, and you can write a single routine to do it (usually) in all instances. This may be the only place you need it, though, since the times between other random rolls is usually based on the the amount of time the player took to need them, almost always truly random.

_____________________________

At LAST! The greatest campaign board game of all time is finally available for the PC. Can my old heart stand the strain?

(in reply to Marshall Ellis)
Post #: 42
RE: Intriguing idea: Hiding the rolls - 8/14/2009 7:27:42 PM   
Jimmer

 

Posts: 1968
Joined: 12/5/2007
Status: offline

quote:

ORIGINAL: eske

This does appear to be the answer to a lot of prayers

However - without having studied this thread from the start - can you tell me it is not possible to test the pre-rolled die-rolls, and make battle decisions based on it ??

For instance run this round two of a battle - see that opponent almost breaks - then reload the game. This time decide to commit my guard and re-run round two and now he breaks.... ?

Oh, and does this feature also apply to naval battles ??

/eske

You would have to be able to run the game on two computers, one your own, and the other one acting as your opponent's. The only good it would do you would be to be able to not do the battle. But, that decision was made during land MOVEMENT, not during land COMBAT, and the dice were rolled at that time as well. So, you're committed before you learn what the rolls were.

The only advantage I can see is perhaps changing the order of battles based upon knowing which ones you were going to lose and which you would win. You can't change who wins which battles, but you might change your reinforcements into them. That seems like a lot of work for very small gain.

We didn't discuss naval battles, but a similar concept could be applied there. There are a lot fewer dice to roll, but still ....

Marshall?

_____________________________

At LAST! The greatest campaign board game of all time is finally available for the PC. Can my old heart stand the strain?

(in reply to eske)
Post #: 43
RE: Intriguing idea: Hiding the rolls - 8/14/2009 7:28:40 PM   
Jimmer

 

Posts: 1968
Joined: 12/5/2007
Status: offline
Oh, and if you use the password feature, you can't run the other guy's turn.

_____________________________

At LAST! The greatest campaign board game of all time is finally available for the PC. Can my old heart stand the strain?

(in reply to Jimmer)
Post #: 44
RE: Intriguing idea: Hiding the rolls - 8/15/2009 5:32:33 AM   
Grognot

 

Posts: 409
Joined: 12/7/2007
Status: offline
Technically, you shouldn't need to "bundle" any rolls at all -- at least, if

(1) we have some compute power (which probably isn't an issue for rolling battles, because we're talking small numbers of rolls and strictly turn-based -- the human beings are by far the gating factor)
(2) we have reasonable faith in cryptographers and their ability to vette hashing functions for statistical weakness


For instance, while MD5 is an imperfect function against determined attack, it still serves as a deterministic, but difficult-to-predict function where even minor alterations in the input can result in substantially different bit sequences. In addition, the correlations between the different bits should be low.

Consider a system in which a single random sequence were created and stored in the initial game file (and only machines rolling dice would need it -- ideally, this would be the host, but this makes naval movement phase very painful due to the interception rolls). To generate any given roll, this could be concatenated with some description of the roll type e.g.

"<seed>-<year>-<month>-<phase>-<location>-<more roll data>"

with qualifiers as need be; for instance, if one wanted to ensure that a guard commitment roll would be the same regardless of what round, one could avoid mentioning the round number, whereas 'combat-attacker-<day>-<round>' might be used for rolling dice to determine casualties. The details would not need to be disclosed, but they would need to be consistent, and sufficient so that different events would actually get different inputs (like a siege battle would need an way to distinguish it from the field battle, since both might happen in the same turn and location).

Then take this monstrous string, feed it into a reasonable digest function (just need one with good entropy characteristics). We only need six different outcomes, so three bits can be chosen (and again, the choice does not need to be disclosed). Three bits results in eight outcomes, not six, so approximately 25% of the time this will require a 'reroll'. Some number of rerolls can be determined by choosing different (non-overlapping) triples; this is reasonable since the correlation between bits should be low. If *all* specified triples land in 'reroll' results, then add a fixed suffix (e.g. "-reroll") to input string and repeat; the probability of getting a die roll instead of a reroll request should rapidly converge to 1.

This sort of thing could
(1) ensure platform independence and reproducibility, provided one is careful about bit ordering -- which might be useful for fixing bugs

(2) tie rolls down to location or other criteria (e.g. ensuring that the order in which one does forage rolls does not matter, by tying it down to something like <nation>-<corp id>-<time specs>),

(3) still ensure a high degree of unpredictability despite being completely deterministic, provided that the secret seed is not trivial to extract and/or that the exact algorithm to compose the strings (which could be arbitrarily ornate; even shifting the last byte to the first position might make a large difference in the rolls) and/or the method of selecting bit triples is hidden (and there are a gazillion ways to choose 42 non-overlapping triplets of bits from a 128-bit sequence, because there's no requirement that the bits in any triple be consecutive). All rolls would be 'predetermined' but the determinations would be basically impossible to without some serious code disassembling... .and why somebody would put that level of effort into determining the roll algorithm for an obscure, rather niche game is beyond me.


It would *not* have any effect on problems such as restarting the naval phase to avoid interception, or anything else that would only be solvable through adding additional file exchanges or the like. It would provide some very interesting properties that would be useful for reproducing bugs, preventing any benefit from reordering a set of die rolls, and the like. And since most of the magic would be in the code and the very first game setup file, the incremental turn files shouldn't need to grow.

Ain't perfect, ain't complete, but it might be worth thinking about.

(in reply to Jimmer)
Post #: 45
RE: Intriguing idea: Hiding the rolls - 8/17/2009 1:54:11 PM   
Marshall Ellis


Posts: 5630
Joined: 10/2/2001
From: Dallas
Status: offline
Jimmer:

Actually, I think we're pretty close to GOOD random. Without giving up the house, our seed changes multiple times per session based on the local CPU's clock but even then the rolls are spread across 7 machines using different seed values (changed multiple times per session) so getting any type of pattern would be difficult.


< Message edited by Marshall Ellis -- 8/17/2009 7:08:50 PM >


_____________________________

Thank you

Marshall Ellis
Outflank Strategy War Games



(in reply to Grognot)
Post #: 46
RE: Intriguing idea: Hiding the rolls - 8/17/2009 7:03:47 PM   
Jimmer

 

Posts: 1968
Joined: 12/5/2007
Status: offline

quote:

ORIGINAL: Marshall Ellis

Jimmer:

Actually, I think we're pretty close to GOOD random. Without giving up the house, our seed changes multiple times per session basedon the lcoal CPU's clock but even then the rolls are spread across 7 machines using different seed values (changed multiple times per session) so getting any type of pattern would be difficult.


Excellent! Way ahead of me.

_____________________________

At LAST! The greatest campaign board game of all time is finally available for the PC. Can my old heart stand the strain?

(in reply to Marshall Ellis)
Post #: 47
Page:   <<   < prev  1 [2]
All Forums >> [New Releases from Matrix Games] >> Empires in Arms the Napoleonic Wars of 1805 - 1815 >> RE: Intriguing idea: Hiding the rolls Page: <<   < prev  1 [2]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

1.938