No video

The Trade A.I. of NES Monopoly - Behind the Code

Fast code walk of the logic used for the computer player to determine how to respond to a human player-proposed trade.
If you would like to support this channel, here is a link to the Displaced Gamers Patreon page - / displacedgamers
Twitter: / displacedgamers
Facebook: / displacedgamers
Instagram: / displacedgamers
Music by:
/ hariboosx
/ @wolfandraven
#Monopoly #ai #Programming

Пікірлер: 381

  • @DisplacedGamers
    @DisplacedGamers3 жыл бұрын

    I broke one of Monopoly's rules in this video! Did you catch it?

  • @ivoramirez6996

    @ivoramirez6996

    3 жыл бұрын

    I haven't even watched it yet

  • @Kippykip

    @Kippykip

    3 жыл бұрын

    I'm still watching it and I'm friggin impressed with how you decompiled it so well

  • @izzieb

    @izzieb

    3 жыл бұрын

    I don't know what rule you broke, but for that - Go to Jail! Go directly to jail. Do not pass go. Do not collect $200.

  • @MobCat_

    @MobCat_

    3 жыл бұрын

    I mean I didn't even know you could trade in Monopoly till today.... so no...

  • @BradCorrupts

    @BradCorrupts

    3 жыл бұрын

    You rolled doubles and only took one turn. :)

  • @jaysonl
    @jaysonl3 жыл бұрын

    You know you've been watching too many videos on assembly language when you see "Player cash: $3500" and your first thought is "Why are you throwing hexidecimal at me? Why not just say they have ... oh wait. DOLLAR SIGN 3500, not 0x3500"

  • @VinsCool

    @VinsCool

    3 жыл бұрын

    Lol I had the exact same thought, mainly because I had spent a lot of my free time learning how to code lately.

  • @DisplacedGamers

    @DisplacedGamers

    3 жыл бұрын

    ... same.

  • @Ehal256
    @Ehal2563 жыл бұрын

    Sim city on the nes would be another fascinating game to investigate.

  • @DisplacedGamers

    @DisplacedGamers

    3 жыл бұрын

    That one has quite an interesting history to it!

  • @noor-rx1ij

    @noor-rx1ij

    3 жыл бұрын

    Yes, please do!

  • @ohnoitschris

    @ohnoitschris

    3 жыл бұрын

    Seconded

  • @aner_bda
    @aner_bda3 жыл бұрын

    I remember playing Monopoly on the NES. I think it was the first time that I actually learned the rules because everyone I played with up to that point seemed to have their own house rules.

  • @ridespirals

    @ridespirals

    Жыл бұрын

    Monopoly is a horrible board game, but the house rules make it so much worse. they always make the game drag on for way too long in one way or another, and this game isn't supposed to go on for 6 hours. I hate Monopoly, ever since I learned about "good" board games I refuse to play Monopoly at all.

  • @shipped_my_pants_3000

    @shipped_my_pants_3000

    11 ай бұрын

    Everybody who wants to get into monopoly should be required to put in a minimum of 4 hours into this game

  • @tezcanaslan2877

    @tezcanaslan2877

    6 ай бұрын

    @@ridespiralsmonopoly is actually really good if you play the editions that doesn’t allow trading

  • @damiencouturee6240

    @damiencouturee6240

    5 ай бұрын

    Id played monopoly a few times over my life, never very well. I didnt even know what the little houses were for until I was like 25. Last time I played was with my ex and her brothers, I think we played for about an hour before we were all annoyed and just put it away lmao. Its drfinitely not a game for everyone, but thats what makes it nice its not trying to be as bland as possible to try and appeal to every single person, its Monopoly and thats it, if you like it cool, if not theres other games, you arent required to play it. Wish more things could be like that nowadays, if you dont like it just dont interact with it.

  • @musickid43
    @musickid432 жыл бұрын

    This version I'd still my preferred electronic version to play mostly because of its speed and not having to watch a slow animation of the tokens advancing.

  • @rougelazer8278

    @rougelazer8278

    2 жыл бұрын

    I agree, was looking around and it seems to the fasted version

  • @DoomRater

    @DoomRater

    2 жыл бұрын

    Beats (lol,Breasts) the ever loving pants off the C64 version which doesn't even automate rent collection. The rules of the game force players to ask for rent, it's actually not supposed to be automated, but dear Lord that's slow

  • @jonc5152
    @jonc51523 жыл бұрын

    " Don't be coming back now..." and the sound of the cash register eating the bills I will never forget

  • @johnray527
    @johnray5272 жыл бұрын

    I'm not a programmer, though I've picked up limited ability to read/understand/follow code over the years. Not really a "math guy" either, though I'm not put off by math. I love this channel.

  • @dchardin1
    @dchardin13 жыл бұрын

    This game was AWESOME on NES. I have wondered about some of the programming and rules that must have gone into this. I still play it often. The AI was very smart (and sometimes Verrrrry ruthless!!!). Sadly, I think the masterful developer who designed it is no longer with us.

  • @DisplacedGamers

    @DisplacedGamers

    3 жыл бұрын

    Agree with you on all points. I intentionally wanted to mention Bill Williams in this video. Was sad to discover he was no longer with us while I was doing research. I would have loved to e-mail him and pick his brain! I am thankful for his hard work.

  • @hicknopunk

    @hicknopunk

    3 жыл бұрын

    @@DisplacedGamers oh dang. I didn't know he had passed.

  • @BrainSlugs83

    @BrainSlugs83

    2 жыл бұрын

    It's honestly the best digital version of the game.

  • @anonamatron

    @anonamatron

    2 жыл бұрын

    I think it's the easiest one. It lets you trade cash for monopolies, and most other versions refuse unless you trade a lot of important properties. On the NES version you can just buy up one of each color right as the computer players buy them, (I mean I wait for them to land on one, then trade as little cash as possible to get it, which they usually accept since nobody else owns the others) and get your fingers in every monopoly, so everyone will depend on you for trades later. You'll need to pay a lot to get a monopoly, but the computers will accept it given enough cash. I usually try to get one monopoly, like Baltic/Mediterranean (while getting at least one from every other color of course) and build up some funds with that before trading for another monopoly or two. Everyone will be bankrupt shortly after that.

  • @jumpman8282

    @jumpman8282

    2 жыл бұрын

    @@anonamatron Usually I sell Mediterranean/Baltic early on to whoever gets the second purple (unless I get it myself, of course). You can almost always get at least $1,000 for it. Then I use that cash to get a better monopoly. Since you always pass Go right before you land on a purple you will effectively never pay more than $250 rent, so don't worry about going bankrupt. As long as you keep the other monopolies to yourself (maybe apart from the utilities) you should be able to kill the game rather quickly.

  • @bnasty267
    @bnasty2673 жыл бұрын

    It's interesting to see the real meat of the trade algorithm: the lookup table of property values. It generally lines up with how I remember the game, with the orange properties (St James) being my favorite. Cheap to buy and build, but had some decent rents. The reds and yellows were also highly desired in my family when we played, and given high scores here. I am shocked, however, with the high value on the light blue properties. In my hundreds of plays with my family, I don't remember anyone winning by developing these properties exclusively. Anyway, thinking about this brought back some fond memories of time playing a game with some family members that are no longer here. Thanks for the vid.

  • @AGMS00

    @AGMS00

    3 жыл бұрын

    I wonder if it is based on the table of return on investment on page 48 of "Winning Monopoly" by Kaz Darzinskis ISBN 0060961279. Still have a bookmark there from when I did the AI for Electronic Arts 2008 (or 2010?) version of Hasbro's Monopoly. The idea was to base the algorithm on the book, then dumb it down for the various AI personalities (Railroad Magnate had overvalued railways, for example). By the way, I also did the 1997 Star Wars Monopoly rules engine (also used in 2000), and one of our younger programmers at Artech (not sure if he was co-op or recent grad) did the AI. We had a scanned in 2D board version as a plain Windows app that could run the game really fast, about 7 seconds per game. Found lots of AI bugs that way! The rules engine was message based, so you could plug it into the fancy 3D user interface or just have a 2D board with dialog boxes and buttons. Messaging also made remote play easy, as well as switching slots between Human players and AI (in case a network connection dropped). It had a stack based architecture, so you could interrupt a trade to do a mortgage and so on to however many nested levels you wanted. Some other Monopoly engines don't do that :-)

  • @SgvSth

    @SgvSth

    3 жыл бұрын

    @@AGMS00 I will say it is a good thing you were able to check for AI bugs as Ubisoft's Monopoly version was unfortunately not tested enough upon its release. kzread.info/dash/bejne/q5-oydOcZJWZmMo.html

  • @AGMS00

    @AGMS00

    3 жыл бұрын

    @@SgvSth Yes, that sort of infinite loop would be picked up easily in the automated game testing we were using. Also back in the day we had a very good (best one ever actually) producer at Hasbro keeping an eye on the game development. Not sure if they still do that (hire a studio to make the game) or just outsource everything for a license fee. That choice would affect decisions about quality too.

  • @ieatvirgins

    @ieatvirgins

    2 жыл бұрын

    @@AGMS00 I swear the computer cheated at Star Wars Monopoly. 8 year old me certainly thought so!

  • @AGMS00

    @AGMS00

    2 жыл бұрын

    @@ieatvirgins Ha! That was the number one bug report we kept on getting.

  • @thomashorine9198
    @thomashorine91983 жыл бұрын

    The orange monopoly has additional value as its lower rent is offset by its 3 spaces versus dark blue's 2. This doesn't account for the full discrepancy, however. I would surmise that they used a Monte Carlo simulation to also determine most likely places to land. The fact that people can skip along via cards and get sent to jail makes it a non-trivial problem. People leaving jail and landing on orange is likely the other key factor.

  • @bnasty267

    @bnasty267

    3 жыл бұрын

    They probably also factored in the cost of developing (i.e. house cost) vs the rent with various house levels/hotels. The orange properties (ranked highest in code) were always my favorite: $100 houses (not the yellow/red $150 or green/blue $200), but could still put a hurtin' on your opponent if they hit on a hotel.

  • @pigs18

    @pigs18

    3 жыл бұрын

    Two of the orange properties are six and eight spaces from jail making them two of the most oft landed on properties on the board, either by players rolling doubles to get out of jail and players rolling after paying. (The more common 7 roll lands one on Community Chest instead.) Illinois is the most often landed on property on the board, but it's placement around a corner means that it's more expensive to build on those properties. (M$150/building vs M$100/building.)

  • @TheRationalPi

    @TheRationalPi

    3 жыл бұрын

    You don't need to do Monte Carlo on this. I had a class assignment once to set up a full state transition matrix for the monopoly board (including cards and triple-double rolls to jail), and you can use that to find the average percentage of occupancy for each space for any given turn in the game. You could also determine the average occupancy of each square "in the long run" using eigenvalue decomposition. If you do this, you do indeed find that the Orange properties are much much more likely to be landed on than Dark Blue.

  • @thomashorine9198

    @thomashorine9198

    3 жыл бұрын

    I have also used (a much simpler) such project for my linear algebra students, but I figured a Monopoly programmer, who had access to a working model, would probably just use Monte Carlo.

  • @RichardCraig

    @RichardCraig

    3 жыл бұрын

    Jail is absolutely the factor. Even in a two player game it seems like we're in jail every third turn!

  • @pigs18
    @pigs183 жыл бұрын

    This game taught me a trick that I use against human opponents to this day. The AI in the game weighs obtaining a Monopoly with far more importance than it probably should. Similarly, obtaining a Monopoly is a carrot you can dangle in front of a human player. But I do so with one caveat. I'm just going to need some money to sweeten this deal. Then, if I obtain the remaining property in a color group I need (which, oh so coincidentally, happened to be exactly seven spaces away when I made the deal), I can instantly load up on houses while at the same time leaving my opponent too cash strapped to purchase much in the way of their houses. (Particularly if I just unloaded the greens on them.)

  • @verve1858
    @verve18583 жыл бұрын

    It would be cool to compare code from different versions of Monopoly and see how the algorithm has changed

  • @samuelthecamel

    @samuelthecamel

    3 жыл бұрын

    The AI is still not very smart even in modern Monopoly games. Sure, it is smarter, but there are always ways to exploit the AI.

  • @RichardCraig

    @RichardCraig

    3 жыл бұрын

    Specifically I wonder about the other ports of this specific version... It was on Genesis, SNES, Gameboy, and GameGear (not Master System, it was completely different). The best part is they threw a wig on poor old Isaac and renamed him Betty Sue for the SNES version, lol! Early transgender video game character perhaps?

  • @BagOfMagicFood

    @BagOfMagicFood

    2 жыл бұрын

    I wonder if anyone ever ripped the code from the standalone talking LCD handheld Monopoly game I used to have!

  • @CarbonRollerCaco

    @CarbonRollerCaco

    2 жыл бұрын

    @@RichardCraig I think they changed ALL the CPU characters. There was a Jeeves from what I remember.

  • @Phoboskomboa
    @Phoboskomboa2 жыл бұрын

    It's been forever since I played this, but I remember noting how obsessed the computer was about completing monopolies, even on lesser properties. You could often get them to give you all of their cash and several other properties for one of the lowest valued monopolies, and then they wouldn't even be able to afford to put houses up.

  • @FEARitself100

    @FEARitself100

    Жыл бұрын

    This is how I would play, especially if I aimed the 2 giants lol my goal was always 'buy 2 properties, and 1 goal property' then Offer a trade with a computer my random property to get them to bite, and it's insane how fast I win cause their desperation always made them overspend

  • @donskiver
    @donskiver2 жыл бұрын

    The reason why the orange monopoly is valued so highly is because the jail space on the board. Between chance cards and rolling doubles 3 times, you are highly likely to land in jail at least once in a game, if not multiple times. To get out of jail you have to roll doubles, use a get of jail free card, or fail to roll doubles 3 times and pay your fine. You'll very likely end up on an orange space afterwards, and if you've loaded them up with houses/hotels (which is relatively inexpensive to do because of their position on the board) you'll make a HUGE dent in a players assets, if not bankrupt them entirely.

  • @joshmyer9
    @joshmyer93 жыл бұрын

    I opened up KZread to watch during lunch, and found this. It was an excellent lunch break: thanks for doing the incredible amount of work required to tease this whole mess apart!

  • @WhoIsRyanFox
    @WhoIsRyanFox3 жыл бұрын

    "How would you design this algorithm?" Me: Hm, maybe some kind of 4-player variant of expectiminimax? NES Dev: LOL, nope. Lookup tables!

  • @TheRationalPi

    @TheRationalPi

    3 жыл бұрын

    In the dev's defense, math is hard.

  • @Chronosv2

    @Chronosv2

    3 жыл бұрын

    The problem with computations like that is that the NES only has 2KB of RAM. 256 bytes for the Zero Page (RAM that's faster to access because it requires 1 less instruction lookup), up to 256 bytes for the processor's stack to store the program counter, accumulator, x and y registers before subroutine and IRQ jumps, and 1.5KB for use on anything else including sprite locations/info to copy to the PPU, sound/music-related information, etc. An algorithm like that would take a long time on the NES' simple 1.79MHz processor, and would take up a fair amount of RAM to store all the information needed to complete a cycle. While using such an algorithm would make sense for some games, I think 3 players sitting around a TV would get rather upset with Monopoly taking a long time to figure out its best deal for a fourth CPU player. Add multiple CPU players to the mix and that time spent could get stupid. On 8-bit computers, *most* complex calculations were done in lookup tables. Need a sine wave? Need non-power-of-two multiplication and division? The fastest way to go about those tasks is typically a lookup table.

  • @williamdrum9899

    @williamdrum9899

    2 жыл бұрын

    Why do the work at runtime (especially on a machine that can't multiply or divide in hardware) when the results are always the same?

  • @ZipplyZane

    @ZipplyZane

    2 жыл бұрын

    Also, the game allows up to 8 players. I remember it being the only 8 player NES game I'd ever heard of back when I was a kid. You just all play with the same controller.

  • @nicrule4424
    @nicrule44243 жыл бұрын

    I recently started picking apart Galaga on the NES in an attempt to hack in simultaneous co-op. I keep getting lost in subroutines I can't find a purpose for, but I am so lucky it doesn't have anything nearly this complex going on. I don't know how you do this with so much abstract code that doesn't have any clear output to the game. This must have taken forever. Anyway, thanks for another interesting video.

  • @NesrocksGamingVideos

    @NesrocksGamingVideos

    3 жыл бұрын

    Hack the soubroutine call replacing it with EA EA EA and play the game to see if anything changes! Sometimes even this fails to give you a clue since it can be subtle.

  • @recompile

    @recompile

    2 жыл бұрын

    It's really just a matter of spending enough time with it. A good debugger makes a huge difference, but it's mostly going to come down to careful note-taking, time, and intuition. Also, try not to get 'stuck' on one thing. You'll find that, sometimes, the code your looking at is just nonsense, either doing nothing or purposefully wasting time. I show some of that in the 'fixing e.t.' article. Assembly programmers weren't gods, after all, and they did stupid things just like programmers today.

  • @xotmatrix
    @xotmatrix3 жыл бұрын

    Thanks for this analysis. NES Monopoly doesn't get enough love.

  • @GHKuinli
    @GHKuinli3 жыл бұрын

    A glitch in this game is that if you hold "down" on the d-pad while your turn is active you would skip the pay screen when landing on the opponents properties and thus avoid losing any money and breaking the game as you would be literally invincible.

  • @renakunisaki

    @renakunisaki

    2 жыл бұрын

    Is it a glitch or a leftover debug function?

  • @GHKuinli

    @GHKuinli

    2 жыл бұрын

    @@renakunisaki I think it is in fact a glitch, as it doesn't need any previous inputs or setup to activate it and how easy it is to take advantage of it at any point in the game, and without any visual or sound indication that it has happened, it can easily deceive human players who are not paying attention to their money.

  • @FlashDrive356

    @FlashDrive356

    Ай бұрын

    I pulled up monopoly on my GBC and decided to try it, not only does it skip payment but it causes me to skip around the board (i.e. from a red tile to a pink in 1 turn and getting the money from passing go), definitely a glitch

  • @VinsCool
    @VinsCool3 жыл бұрын

    That was great to watch develop as the code was being explained, I could mostly follow along without too much trouble understanding, and that was the best part for sure. I have been digging the rabbit hole of 6502 ASM programming for some time now, and it really makes me smile to realise how much thinking outside of the box is required to work around the limitations to get things to work at all. It's a lot of fun, a painful journey for sure, but for someone who is stubborn about what they want to achieve just to prove a point, it's incredibly satisfying to get through the code, read the comments, and think, damn, that took a lot of fucking around to get this working at all, and man does it feel satisfying when things do work as expected after hours if not days of trial and error. Sometime, it's the dumbest approach that could be the solution, so I always think about this situation where the code makes no sense, and remember, maybe that's why it works, it doesn't try to be logical, but simply accomplish what you want it to do, 1 instruction at the time :D

  • @Twenty_Six_Hundred
    @Twenty_Six_Hundred3 жыл бұрын

    Love your videos. Fun fact: The NES version is one of the fastest flowing ports of Monopoly

  • @DisplacedGamers

    @DisplacedGamers

    3 жыл бұрын

    I've played this one more than any of the other versions I have played (although my sample size is not *that* large). The "hurry" mode that cuts the fluff (charming fluff... but fluff) is awesome.

  • @Twenty_Six_Hundred

    @Twenty_Six_Hundred

    3 жыл бұрын

    @@DisplacedGamers Yeah it's my favorite version because of how fast the game plays. Many others leave the player waiting though long winded cutscenes and extended A.I decision times

  • @RichardCraig

    @RichardCraig

    3 жыл бұрын

    Same here, I can fly through a game with 7 CPU opponents in like 20-30 minutes.

  • @jamesmcphee2855
    @jamesmcphee28553 жыл бұрын

    Great video! I would someday like you to do the SNES version of SimCity, and why the traffic is broken on roads. I remember as a child needing to remove every road and replace them with rails, which wasn't very realistic. It's always bothered me, and I've been hoping for an explanation or a patch to fix it for many years.

  • @aegisofhonor
    @aegisofhonor2 жыл бұрын

    Monopoly is my favorite Nintendo game of all time. It is the only Nintendo game I saved my own money and bought the game new at full price back in 1992. I have played many versions of Monopoly and it is my favorite video game version of Monopoly even to this day. It has so much character and great sounds and fun, it can't be matched by newer versions.

  • @PlasticCogLiquid
    @PlasticCogLiquid3 жыл бұрын

    Bill Williams is the genius that made Alley Cat

  • @LegendBegins
    @LegendBegins3 жыл бұрын

    I always look forward to this series! Thanks for diving into the code so we don’t have to!

  • @DisplacedGamers

    @DisplacedGamers

    3 жыл бұрын

    There was definitely a moment with Monopoly trade code where I had to decide IF I wanted to see the thing through or not.

  • @homestar92
    @homestar923 жыл бұрын

    Always a treat when your channel pops up in my notifications. As a programmer, gamer, and monopoly apologist, this video ticks a lot of boxes for me!

  • @tomsko863
    @tomsko8633 жыл бұрын

    YAY, Babylon 5 Reference! You have my eternal subscription now. "I see a great hand, reaching out of the sky"

  • @DisplacedGamers

    @DisplacedGamers

    3 жыл бұрын

    Yes! I am glad you caught that!

  • @tomsko863

    @tomsko863

    3 жыл бұрын

    ​@@DisplacedGamers I see it in places it usually doesn't exist. FYI, Mira Furlan died recently :(

  • @arthurhenriqued.a.ribeiro2078
    @arthurhenriqued.a.ribeiro20783 жыл бұрын

    First time I picked up what an LSR is; saw that on a Zelda Wrong Warp video but never got an in-depth look into it. Props to you!

  • @Chronosv2
    @Chronosv23 жыл бұрын

    These videos are always a fun watch. As someone who's trying to get into 8-bit computer/console game development, this information is always absolutely fascinating to watch and learn from. Thank you for taking the time to put these together!

  • @coreybarnett2158
    @coreybarnett21583 жыл бұрын

    Loved this game growing up. I really appreciate the game more knowing the lengths the developer went to programming the AI.

  • @beatchef
    @beatchef3 жыл бұрын

    When I hear this music 0:47 I'm expecting 8-Bit Guy to be getting excited about a computer and retrobriting it. 😁

  • @Acoha7
    @Acoha73 жыл бұрын

    I really love this series. You keep blowing my mind with such novel ideas for analysis content! I can’t fathom the amount of work you must’ve put into it. The game genie easter egg was an excellent idea. Good stuff.

  • @RichardCraig
    @RichardCraig3 жыл бұрын

    I've been playing this specific version regularly since it came out! I love when the AI gets into trade fights. Please PLEASE do a video explaining any (if there are any) difference between the AI opponents. That's always been something I've wondered about!

  • @ZipplyZane

    @ZipplyZane

    2 жыл бұрын

    Seeing as Ollie is specifically needed for the speedrun, it would suggest that the difference in CPU players do matter. And, assuming he didn't skip over anything else, it would seem the differences must be in the "what to offer in trade" logic. This is interesting to me, as it makes me wonder why they choose Ollie. Is it just because he will actually offer a trade at the beginning? Because the above paragraph suggests all the CPU players would accept the final trade.

  • @knurlgnar24

    @knurlgnar24

    2 жыл бұрын

    I don't know the programming details but the AI players all have different trading styles. Some refuse nearly all trades, others like Ollie accept terrible deals. I think they simply put a multiplier on the value calculations or some similar thing. Other than that they play mostly the same.

  • @TheVideogamemaster9
    @TheVideogamemaster96 ай бұрын

    I recently developed my own monopoly game in JavaScript, and I was surprised at how much code and logic goes into all the interconnected systems. After 3,000 lines, I was starting to regret my decision lmao

  • @Fender178
    @Fender1782 жыл бұрын

    My favorite version of video game Monopoly. I played the hell out this on my NES back in the day. That trade exploit is funny as hell make the CPU player go bankrupt because he couldn't pay the 10% interest on the mortgage. Also the rule you broke is that you rolled doubles there for you skipped your extra turn. Speed runners have a good sense or humor.

  • @kri249
    @kri2493 жыл бұрын

    This was totally worth the wait. I'm curious about one thing though, do each of the computer players have different codes that determine their decisions in the game? I wondered this because of the choice of Ollie to achieve the speedrun. Would any of the other players have made the same mistake? Are some more cautious while others are more confident? Because if I were to code a monopoly game I'd do this to simulate the diversity of players you'd face in real life. Including players like Ollie. Which makes me wonder if there's more treasures amongst the mountain of code you already dug through. Either way this was a great video. I can never get enough of these.

  • @pilotcritic

    @pilotcritic

    3 жыл бұрын

    When I was 10 I somehow concluded that Ollie was the dumbest player in the game. I don't remember how I reached that conclusion but I don't think it's a coincidence

  • @RichardCraig

    @RichardCraig

    3 жыл бұрын

    @@pilotcritic I always assumed they're arranged in order of difficulty with the fancy pants rich people being tough while Ollie looking like Golgo 13's homeless cousin doesn't look like much of a threat.

  • @adamengelhart5159

    @adamengelhart5159

    3 жыл бұрын

    If you look at the video around 0:50, you can see the text "Top Four" on the right with arrows pointing to the left, and the text "Bottom Four" on the left with arrows pointing to the right. Ollie's position in the lower right corner is right where I'd expect the worst AI to be. Also @Richard Craig's "looking like Golgo 13's homeless cousin" comment: congratulation; a winner of the internet is you. :-D

  • @jansenart0
    @jansenart02 жыл бұрын

    This is such an underrated video. NES Monopoly ought to blow any programmer's mind.

  • @Dinnye01
    @Dinnye012 жыл бұрын

    Daaamn. You got recommended under an MVG video. I am glad I clicked. Instant subscribe!

  • @Sixfortyfive
    @Sixfortyfive2 жыл бұрын

    11:53 It's common knowledge among Monopoly players that the orange color group is the most valuable one in the game, mainly for two reasons: 1) It's the most commonly landed on group (prime distance from jail), so it collects rent more than any other. 2) It's cheap to build on ($100 per house), so you can more easily develop it to a point where it cripples other players. I'm not shocked to see the light blue group rated highly for similar reasons, as it's the cheapest group to develop on and a good stepping stone toward the "housing shortage" strategy of buying up all the houses.

  • @Paul-qg3iw
    @Paul-qg3iw8 ай бұрын

    As Gen Xer who in lock down went back to my childhood tech, I am so full of admiration for the programmers and designers whose creativity and brilliance gave me and many of my cohorts a childhood which simply had no parallel with that which what before...oh and I love that break this down on programming too!

  • @SaberKittyZero
    @SaberKittyZero2 жыл бұрын

    OMG I actually remember this game. Played quite a bit of it when I was a kid.

  • @Greatfox54
    @Greatfox543 жыл бұрын

    I didn't know NES monopoly speedrunning did it that way. I grew up with genesis monopoly and while abusing the ai trade behavior with utilities, I'd mortgage the utility I had to get the $75 and then trade it to the ai for $490. They added a check for that exact scenario NES monopoly speedrunning takes advantage of and even if the ai accepts the trade and wouldn't be able to afford the 10%, it automatically declines the deal on the ai's behalf so that exact bankrupt can never happen. Makes me wonder what else is different between the NES version and Genesis version. Great code walking for this video.

  • @skins4thewin
    @skins4thewin3 жыл бұрын

    Lol it's funny that you bring this video out now, considering I've just started playing the NES & SNES versions of Monopoly regularly. I also found it funny that the NES version seems to be MUCH better than the SNES one, w much cleaner & easier to use menu's and the game just runs much better & faster. You can complete a full game of Monopoly much faster on the NES version.

  • @trippe2k
    @trippe2k2 жыл бұрын

    I apprecaite you making these videos. I know you may not always get millions of views but I really enjoy these videos and like the deep analytics your provide on each topic.

  • @wknight8111
    @wknight81112 жыл бұрын

    If you're going to be looking at AI, it would be awesome to try and dissect the diplomacy AI for Civilization 2. Even ignoring the "Ghandi is a genocidal maniac who loves to launch nukes" bug, it's still interesting to see what deals different civs will make.

  • @GrayBlood1331
    @GrayBlood13313 жыл бұрын

    I really love these code walks, which is good news for you since it means you'll have an endless supply of content!

  • @PotbellyPunch
    @PotbellyPunch3 ай бұрын

    the game boy port was one of my favorite travel games. It felt like magic having CPU to play monopoly with on the go like that.

  • @TroyFullwood
    @TroyFullwood2 жыл бұрын

    this is wanna my fav ports! really well put together

  • @NTSTS0
    @NTSTS0 Жыл бұрын

    This is one of the coolest NES code dive videos I've seen.

  • @ItsHyomoto
    @ItsHyomoto9 ай бұрын

    This is what I learned when writing a chess program. Implementing Chess is trivial right up until the win condition: determining checkmate is where most of the code lies. That sounds like this part of Monopoly: all of the rules and mechanics are fairly trivial to implement except trades.

  • @alexanderyoung5785
    @alexanderyoung57852 жыл бұрын

    I grew up on this exact game, glad to hear so many others cherish it as well

  • @philcooper9225
    @philcooper92252 жыл бұрын

    I've spent a decade in IT but I never wanted to learn about code until I found your channel

  • @fbodirector7464
    @fbodirector74643 жыл бұрын

    This channel should have so many more subscribers than it does I can't think of a better way to make reverse engineering code fun than to dissect classic video games.

  • @DoomRater
    @DoomRater2 жыл бұрын

    If someone told you updated NES Monopoly code is niche, they should go and play both the Commodore 64 versions and the SNES versions, both of which cut a seriously slow pace overall. In fact the Commodore 64 version does not automate rent collection, forcing players to call each other out to collect it! For this reason I had a serious itch to try porting concepts of the NES version of Monopoly to the C64.

  • @theraven1120
    @theraven1120 Жыл бұрын

    Just found this series a few weeks ago. Love it! After reaching and watching this video, a question popped into my head. There are 8 Characters that can be used as CPU opponents. Do they ALL think the same when it comes to this? Or do they each have different "personalities"? Say, example, would CPU A favor a certain property group more than CPU B? Maybe CPU C would be in it for the money game and not necessarily the property game(having the most money over having the best valued property)?

  • @5371W
    @5371W2 жыл бұрын

    I know nothing about coding and am even less about math, but all these videos are so interesting to me.

  • @sagacious03
    @sagacious03 Жыл бұрын

    Neat analysis video! Thanks for uploading!

  • @Webmage101
    @Webmage101 Жыл бұрын

    4:19 'Mobile viewers may require a microscope' Hahaha that's gold

  • @kingawsume
    @kingawsume2 жыл бұрын

    Methinks the monopoly score calculation is also weighted by the likelyhood of landing on a particular space. The Red group of properties are the most landed on spaces on the board, followed by the Orange group.

  • @anon_y_mousse
    @anon_y_mousse2 жыл бұрын

    I haven't played that game in years. I even have a copy for the PC that came with a box of Cheerios back in the 90's. Will definitely have to find it when I finish moving. I think I know which box it's in.

  • @robertrocheville7769
    @robertrocheville77692 жыл бұрын

    I saw a video about what the best properties were and I don't remember the details, but that's why the lookup table is the way it is. Part of it is related to the math of the rolls, and the other part is related to that dag-on "go to jail" space.

  • @RobertDunn310
    @RobertDunn3102 жыл бұрын

    As someone whose programming experience doesn't go beyond simple Python apps, this was an amazing and fascinating video that really satisfies my inner geek in a way few KZread videos have ever managed to do.

  • @lolKbgTgm6621what
    @lolKbgTgm6621what Жыл бұрын

    11:15 - not sure if this comment was meant facetiously, but just in case you were really wondering, there's plenty beyond board location that factors into Monopoly property value - namely, probabilities. All the hotels in the world won't help if people don't actually land on them, so two-property groups (Blue, Dark Purple, and Utilities) are slightly less valuable than otherwise-equivalent three-property groups. Additionally, because players may be sent to Jail or directly to Go, and because dice rolls are clustered around 7, *and* because the Jailbreak mechanics favor the 2nd, 4th, 6th, 8th, 10th, and 12th spaces from Jail, the left and top sides of the board (i.e., between Jail and Go to Jail corners) receive more traffic than the right or bottom. I'll spare the full breakdown, but short version is that the Blue properties are for suckers and the CPU sort of knows it.

  • @alessandrorossi1294
    @alessandrorossi12943 жыл бұрын

    I played this game a ton as a kid and even emulated it in recent years instead of playing modern variants. The NES version is just more fun in various ways and I would definitely play someone’s AI updated NES monopoly! Also I was curious, why do speed runners choose Ollie? Do they play differently? I always thought they did but you didn’t mention it in the AI breakdown

  • @DisplacedGamers

    @DisplacedGamers

    3 жыл бұрын

    So I got into some code on reverse engineering the trade where player slot seemed to make a difference as to how much leeway there was when it came down to accepting or countering an offer... but that was near the end of the work. As for the Ollie part - I am sorry I didn't dig into it more. I just went with what people seemed to be doing on speedrun.com and pushed toward acquiring the scores to see the results.

  • @ohnoitschris

    @ohnoitschris

    3 жыл бұрын

    I have no clue personally, but I had this game growing up, and it seemed like Gertrude was always the toughest AI. That's totally anecdotal, though, but it seemed to hold true even after I grew up and started poking around with save states.

  • @GunsofZapata

    @GunsofZapata

    Жыл бұрын

    if i remember correctly, ollie was a dope

  • @breathstealer5486
    @breathstealer5486 Жыл бұрын

    Seeing the monopoly scores just help vindicate that I've been playing monopoly correctly all these years. Orange properties must be acquired

  • @sanderbos4243
    @sanderbos42433 жыл бұрын

    This was an awesome explanation, thank you for putting so much effort into the presentation!

  • @outseeker
    @outseeker2 жыл бұрын

    ahahah i remember a monopoly game on pc that didn't take mortgage status into account- you could trade mortgaged properties to the computer for stuff you needed, while lumping them with the debt XD thanks for the interesting vid. u typo'd the word "negotiations" btw ^_^ 18:49

  • @RogueBagel
    @RogueBagel2 жыл бұрын

    This video turned out to be WAY more interesting than I thought it would! The part I was hoping you'd get into was the differences in logic/parameters between the AI players. Would love to know who is the smartest/greediest/stingiest, etc.

  • @TetrisMaster512
    @TetrisMaster5123 жыл бұрын

    If you have any interest in doing more videos on game AI, I think an interesting one might be Chessmaster on the NES. Ever since I wrote my own simple chess engine several years back I've been curious about how they implemented this stuff on such a primitive system. Could be an opportunity to cover stuff like game trees and the minimax family of search algorithms.

  • @jorgelotr3752
    @jorgelotr37522 жыл бұрын

    11:58 I'm pretty sure that the score for monopolies is based on the likelyhood of stepping on them. I mean, going by my own experience in the game, the ones rated higher are also the ones that gave me more money or made me lose the most (as well as the places I instinctively want to make my own). Dark Blue is quite expensive, but it's quite difficult to reach them (although you are screwed no matter where you step in that part of the board).

  • @Sixfortyfive

    @Sixfortyfive

    2 жыл бұрын

    The only thing that the dark blue group really has going for it is the "Advance to Boardwalk" card. So at least there's a *chance* of hitting that space on any given roll. Otherwise the price to develop on it would never justify itself. The green group is abysmal because of that.

  • @SvendleBerries

    @SvendleBerries

    Жыл бұрын

    I personally liked going for the orange properties first, because anytime someone got out of jail, there was a good chance they would land on my properties. And once you got hotels on them, things get pretty easy.

  • @DyrianLightbringer
    @DyrianLightbringer2 жыл бұрын

    Out of all property groups on the Monopoly board, the orange group is possibly the most valuable. This is because the first orange is 6 spaces from jail, the second is 8 spaces, and the third is 9. On two six-sided dice, a bell curve puts a result of 7 as the most likely outcome, with 6 and 8 being tied for second most likely. Couple that with the Go To Jail space, the fact that 3 doubles can send you to jail, there is a chance card that can send you to jail, and there is a card that can send you to St Charles Place (which puts you 7 and 8 spaces from the second and third orange properties), and you can see why the orange group is landed on more than any other group on the board. Counter-intuitively, the green and dark blue properties, despite being most expensive, are landed on the least for these same reasons.

  • @niagargoyle
    @niagargoyle Жыл бұрын

    To answer the question posed just before the 12-minute mark (why does orange have a higher value than dark blue), it is important to remember that the value of a property is not just how much it costs but also how much money can be made off of it from rent. Monopoly has so many "go to such-and-such location" cards that nobody ever hits Boardwalk or Park Place. By the same principle, there are several ways to go to jail; and from jail there is a 53% chance that the next square you land on will be orange. Light blue also has a similarly high rating because it has a 53% chance of being hit from Go.

  • @xdonthave1xx
    @xdonthave1xx2 жыл бұрын

    One of my aunts had this game. Sometimes when I would visit, I would set it up to all AI and just watch.

  • @Controllerhead
    @Controllerhead3 жыл бұрын

    Intense video! Loved it. ASM routines are fun to design, but, i have a much greater appreciation for higher level languages now =)

  • @fromthegamethrone
    @fromthegamethrone2 жыл бұрын

    What a video. It's a so weird seeing none UK names on a monopoly board.

  • @DisplacedGamers

    @DisplacedGamers

    2 жыл бұрын

    I never really thought about the names being different until I started doing some research on Monopoly in general, and I almost considered including a little note about names being different.

  • @fromthegamethrone

    @fromthegamethrone

    2 жыл бұрын

    @@DisplacedGamers That was exactly my thinking. More like "Oh, I never thought about there being anything on blue other than May Fair and Pall Mall" yet at the same time, I knew that Monopoly was localised. Either way man, great video - I'll just pretend I understood most of what was going on. I get it on a pseudo code level, it's just logic - but my brain cant understand how those numbers equate to a programming language! Clever stuff, keep it up.

  • @_digitalcoffee
    @_digitalcoffee2 жыл бұрын

    This is the video which earned you my subscription. Bravo Zulu.

  • @bloodykenshiro8218
    @bloodykenshiro8218 Жыл бұрын

    The high valuation of the orange group is probably a bias programmed into the game because it is mathematically the most landed property in the game. Your videos inspired me to try and dig in games with debuggers (though I'm messing with a SNES game). I'm not a programmer or anything, but your videos have been helpful. I hope you can talk about debuggers sometime.

  • @DisplacedGamers

    @DisplacedGamers

    Жыл бұрын

    I would like to talk about debuggers at some point. What would you like to hear/discuss?

  • @bloodykenshiro8218

    @bloodykenshiro8218

    Жыл бұрын

    @@DisplacedGamers mostly how they display information. I'm trying learn Snes asm on my own after watching your videos (trying to lower the encounter rate in a game). I have the RAM address but I can't find the routine yet. Mesen -S does a lot of syntax highlighting that could be clues, but I can't really say.

  • @catholiccontriversy
    @catholiccontriversy2 жыл бұрын

    In N64 monopoly there must be some kind of "don't shift power too much" check for human to human trades, because I remember one time my brother wanted to quit while playing with me and some computers but I wanted to continue, so the plan was that he trade everything to me for $1 and then go bankrupt on the next turn, but the game wouldn't let us, and I think I kept doing "favorable to me trades" until it said "no, can't do any more" with him still having a decent amount of properties and money, and at that point I think we just turned the game off. Pretty neat to see some of the back end as while the programming of the N64 was probably more advanced than the N8 (nintendo 8-bit, play on the bit counting), it probably had a lot of the same "how do I calculate a fair trade" logic.

  • @TheDeelunatic
    @TheDeelunatic2 жыл бұрын

    For St Japes place, Tennessee Ave, and New York Ave, the reason for the max weight on the monopoly for that property set has to do with how far it is from the jail, because the dice roller is more than just a random number generator where it is actually simulating two dice so it's more like a random number between 1 and 6 ran twice instead of a 1-12. This results in rolls that are typically around the 6 7 and 8 range. so what properties are that far from the jail? That's right...6 spaces away is st James place, 8 is Tennessee Ave, and 9 is New York Ave with 7 being the community chest and 10 being free Parking. Worth noting this is basically the best way to win the late game (in video game and in real world) since going to Jail is so common (rolling doubles, go to jail card, the space on the board) Avoiding these properties is damn near impossible.

  • @dudenoway1267
    @dudenoway1267 Жыл бұрын

    Holy cow! About 10 years ago I attempted to clone this game for direct play on PC(window, apple, & Linux OSs) and had the graphix, sound, & menus all done up to the AI logic, and hit a brick wall. Couldn't figure out just how the trade logic was done. so the project stalled. Couldn't find any kind of resource on it at the time either. So this is almost like a god send! Only thing I wish you had taken a stab at is how they tweaked each AI so that they would play a little different. Hence why Ollie is used in the speed run(would any of the other AI go for that instant loose trade just based on the underlining trade logic?)

  • @hgbugalou
    @hgbugalou2 жыл бұрын

    This video made me realize I have forgotten how to do long division. I guess my teachers were right about relying on calculators. I think my next video I watch maybe a math refresher!

  • @RetroPlayer4000
    @RetroPlayer4000 Жыл бұрын

    I actually filled out the forms for creator application at the Beverly mass MB Office

  • @ferceron8992
    @ferceron89923 жыл бұрын

    This video is so informative, but first, we need to talk about parallel properties...

  • @mjc0961
    @mjc09613 жыл бұрын

    21:38 - Excuse me SIR! I rolled doubles, it's MY turn again! 😛

  • @mjc0961

    @mjc0961

    3 жыл бұрын

    **looks at pinned comment and answer in replies** Ah, then yes, yes I did catch it.

  • @Medinaxz
    @Medinaxz2 жыл бұрын

    I know it's old, but some of the properties (orange, light blue) tend to have higher value scores due to simple probability. Over the course of many dice rolls, the player is most likely to hit specific spots on the board. These tend to favor the noted properties above. To me it's interesting that the values of properties are also coded around probability. Even though the later properties tend to rake in the most money, players will often find themselves hitting those two with the most frequency, and a monopoly/houses on them will very often be a solid investment.

  • @torarinvik4920
    @torarinvik49202 жыл бұрын

    Damn you have some serious 6502 assembly skills. I don't understand how it is possible to decrypt code in that manner. Excellent video, a little bit too advanced for me even though I do have some beginner experience in 6502.

  • @ProgrammerDan
    @ProgrammerDan3 жыл бұрын

    lol the amount of will power you must have to dig in all the code is insane. But when you ask what I'd do for the AI, I imitate thought about some simple reinforcement learning, which the direction which they seem to take for this game, having those score as the reward mechanism. But then you kept giving different scenarios that could occurs that I haven't though about it, and I was damn, that's why I suck at monopoly.

  • @michaeldew7904
    @michaeldew79042 жыл бұрын

    I actually learned a Monopoly rule from this video. The part @22:33. I didn't know you had to pay mortgage interest if you don't unmortgage the property.

  • @FrankWolfeUDL
    @FrankWolfeUDL2 жыл бұрын

    this game has a fun achievement set on Retro Achievements!

  • @joshd2538
    @joshd25382 жыл бұрын

    Orange and red are, by far, the most valuable monopolies. If you have even one of those you can proably win. Reason: People get stuck in Jail near the end of the game and when they get out they're almost always going straight to orange or red.

  • @christopherschumacher2649
    @christopherschumacher26493 жыл бұрын

    At 21:34 when you roll a six it's via double 3's. The six would need to be rolled via five and one or four and two as doubles give you an extra turn.

  • @Nomadnetic3
    @Nomadnetic33 жыл бұрын

    This is excellent, great job on your analysis!

  • @onethousandeight
    @onethousandeight3 жыл бұрын

    Thanks for another great video! Ever thought of checking out smb1 code? Especially from speedrunning perspective

  • @DisplacedGamers

    @DisplacedGamers

    3 жыл бұрын

    I definitely want to check out SMB1 at some point.

  • @welbow

    @welbow

    3 жыл бұрын

    @@DisplacedGamers What about the original Dragon Warrior for the NES? NESCardinality's run at one of the GDQs was jaw-dropping.

  • @licksorestockpile1190
    @licksorestockpile11903 жыл бұрын

    glad you included the speedrun exploit!

  • @JamesLewis2
    @JamesLewis23 жыл бұрын

    I wonder how similar the AI is in the Master System version of Monopoly; I know that the data structure for each property would need to be different, because the game supports up to 10 players.

  • @rightyloosey8554
    @rightyloosey85546 ай бұрын

    I'm in the process of playing every single video game adaptation of Monopoly (USA releases only) and the second I saw the title of this video I made excited monkey noises.

  • @licksorestockpile1190
    @licksorestockpile11903 жыл бұрын

    really love these videos!!

  • @TheBlueArcher
    @TheBlueArcher2 жыл бұрын

    Nice video. I have never played any "official" or "licensed" version of video game monopoly on ANY console, where the computer won't get fleeced into a bad situation. There are many different situations for every version, but One VERY common one is that the orange and red property groups are SEVERELY undervalued by the AI for how often they get landed on due to the many ways people can end up in jail...

  • @retrogamestudios7649
    @retrogamestudios76492 жыл бұрын

    I used to love setting it to play 8 cpu players when I was a kid. It's even better if u manipulate the properties beforehand. Give 1 cou all the cash and no deeds....also the fact the I'm from Beverly mass on the title trademark screen I literally could go across the street and ask for the definitive rules book which I still got to this day it's like the size of a bible....damn that Gertrude was ruthless

  • @palaceofwisdom9448
    @palaceofwisdom9448 Жыл бұрын

    The AI that I really want to see analyzed is Monopoly Streets for PS3. Every single game the AI opponents would conspire and make a monopoly of the railroads, which rendered it unplayable unless I managed to buy at least one of them.