Jump to content
popeal

Yahtzee for 2600?

Recommended Posts

The random generation code looks pretty self invented. Maybe the result is not very random.

 

What do you observe?

 

The game has a limited number of patterns for the first roll. How you respond to them often brings the same results, meaning you can replay at least parts of previous games. Not every move, but patterns will definitely emerge where you'll see familiar sequences and be able to predict them. The end result are games that feel very familiar, and end up with almost identical scores. Almost like there are a handful of pre-programmed results in there.

Share this post


Link to post
Share on other sites

 

The game has a limited number of patterns for the first roll. How you respond to them often brings the same results, meaning you can replay at least parts of previous games. Not every move, but patterns will definitely emerge where you'll see familiar sequences and be able to predict them. The end result are games that feel very familiar, and end up with almost identical scores. Almost like there are a handful of pre-programmed results in there.

 

Sounds like random is only being called when the dice are rolled. A simple fix would be to call random once per frame so the time it takes the player to make their choices will have an impact on the random numers being used.

 

I cover that in step 10 of Collect. Search for the word helps to find the relevant part of the blog post.

Share this post


Link to post
Share on other sites

Nope, NextRandom is called once per frame,

 

But the random number generation is very bad. Look at the code:

NextRandom
    ldy     #$03                ; 2
NextRandomFrame                 :     called every frame
.loop
    lda     $D5                 ; 3
    asl                         ; 2
    asl                         ; 2
    asl                         ; 2
    eor     $D5                 ; 3
    asl                         ; 2
    asl                         ; 2
    rol     $82                 ; 5
    rol     $83                 ; 5
    rol     $D4                 ; 5
    rol     $D5                 ; 5
    dey                         ; 2
    bne     .loop               ; 2/3
    lda     $82                 ; 3
Note: All RAM addresses are never changed, except here.

 

I would have to analyze the results, but I am pretty sure the results would be pretty bad. I suppose the number of dice pattern is very limited.

 

@Nathan: Try the latest ROM, the problem should be solved there.

  • Like 2

Share this post


Link to post
Share on other sites

I would have to analyze the results, but I am pretty sure the results would be pretty bad. I suppose the number of dice pattern is very limited.

Admittedly, it makes me feel like I'm a much better Yahtzee player than I actually am. ;)

 

@Nathan: Try the latest ROM, the problem should be solved there.

Will do!

Share this post


Link to post
Share on other sites

Some maths for those who are interested.

 

I ran the first 10000 results of the original Yahtzee random number generator through this test program ("ENT"):

Entropy = 7.984594 bits per byte.

 

Optimum compression would reduce the size

of this 10000 byte file by 0 percent.

 

Chi square distribution for 10000 samples is 213.38, and randomly

would exceed this value 97.28 percent of the times.

 

Arithmetic mean value of data bytes is 127.2176 (127.5 = random).

Monte Carlo value for Pi is 3.118847539 (error 0.72 percent).

Serial correlation coefficient is 0.494682 (totally uncorrelated = 0.0).

Entropy and arithmetic mean are good, chi square is "suspect". No clue about Monty Carlo, but especially the serial correlation seems pretty bad.

Share this post


Link to post
Share on other sites

Thanks for all the work you guys are doing on this game! I've been playing it a bit each day and really impressed. I wish we knew more about who made the original ROM.

 

I'm also glad no one yelled at me for bringing a 14 year old thread back from the dead. ;)

Share this post


Link to post
Share on other sites

Some forums care more about "necro-bumping" than others. I say if it's really that much of a concern, find some option that lets threads auto-lock after some time. But most of the time I don't see a problem with it, and in this case I think it was beneficial! :)

Share this post


Link to post
Share on other sites

Some forums care more about "necro-bumping" than others. I say if it's really that much of a concern, find some option that lets threads auto-lock after some time. But most of the time I don't see a problem with it, and in this case I think it was beneficial! :)

It's not a big deal, and I'm not sure why some people make a big deal out of it.

 

..Al

  • Like 1

Share this post


Link to post
Share on other sites

It's not a big deal, and I'm not sure why some people make a big deal out of it.

 

..Al

Myself, I always find it kind of humorous when somebody is concerned about reviving a two or three year old thread when the subject matter is 30 year old technology. :)

Share this post


Link to post
Share on other sites

Myself, I always find it kind of humorous when somebody is concerned about reviving a two or three year old thread when the subject matter is 30 year old technology. :)

More power to someone if they actually dig up an old, but relevant thread they want to comment on. Occasionally someone revives a whole bunch of dead threads without contributing anything interesting to them (basically just "bumping" them up), but that's not the norm.

 

..Al

Share this post


Link to post
Share on other sites

Here is another little update on this. It's based on the last rom posted by Thomas with the new random number generator code and larger pips. In addition to that I fixed a couple of things:

- Pressing reset doesn't cause the TV to loose sync anymore. There's now a smooth transition between the game and the title screen.

- Improved Joystick responsivity and precision while moving the cursor.

- PAL version added

post-10599-0-34197300-1444123205_thumb.pngpost-10599-0-87587500-1444123206_thumb.png

Yahtzee_2015_hack_NTSC.bin
Yahtzee_2015_hack_PAL.bin


I wish we knew more about who made the original ROM.

Here you can find the original post by the author Russel Babylon, dated December 2000.

http://www.biglist.com/lists/stella/archives/200012/msg00036.html

  • Like 6

Share this post


Link to post
Share on other sites

We'll be featuring Yahtzee LIVE on tomorrow's (Friday) ZeroPage Homebrew stream on Twitch at 11AM PT | 2PM ET | 7PM GMT! Hope everyone can watch!

Twitch Stream: http://twitch.tv/zeropagehomebrew/

 

Games:
- Rally-X (2014 WIP) by Ed Fries
- Yahtzee (2015 Hack Fix) by alex_79
- Dominant Amber (2016) by Rick Skrbina aka Wickeycolumbus
- Isaiah's Wii Chase (2008) by Chris Read aka atari2600land

 

post-37205-0-26122200-1557459098_thumb.jpg

  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...