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

  Рет қаралды 92,405

Displaced Gamers

Displaced Gamers

2 жыл бұрын

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

Пікірлер: 379
@DisplacedGamers
@DisplacedGamers 2 жыл бұрын
I broke one of Monopoly's rules in this video! Did you catch it?
@ivoramirez6996
@ivoramirez6996 2 жыл бұрын
I haven't even watched it yet
@Kippykip
@Kippykip 2 жыл бұрын
I'm still watching it and I'm friggin impressed with how you decompiled it so well
@izzieb
@izzieb 2 жыл бұрын
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_ 2 жыл бұрын
I mean I didn't even know you could trade in Monopoly till today.... so no...
@BradCorrupts
@BradCorrupts 2 жыл бұрын
You rolled doubles and only took one turn. :)
@jaysonl
@jaysonl 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
... same.
@Ehal256
@Ehal256 2 жыл бұрын
Sim city on the nes would be another fascinating game to investigate.
@DisplacedGamers
@DisplacedGamers 2 жыл бұрын
That one has quite an interesting history to it!
@noor-rx1ij
@noor-rx1ij 2 жыл бұрын
Yes, please do!
@ohnoitschris
@ohnoitschris 2 жыл бұрын
Seconded
@pigs18
@pigs18 2 жыл бұрын
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.)
@aner_bda
@aner_bda 2 жыл бұрын
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 10 ай бұрын
Everybody who wants to get into monopoly should be required to put in a minimum of 4 hours into this game
@tezcanaslan2877
@tezcanaslan2877 5 ай бұрын
@@ridespiralsmonopoly is actually really good if you play the editions that doesn’t allow trading
@damiencouturee6240
@damiencouturee6240 4 ай бұрын
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.
@jonc5152
@jonc5152 2 жыл бұрын
" Don't be coming back now..." and the sound of the cash register eating the bills I will never forget
@dchardin1
@dchardin1 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
@@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.
@musickid43
@musickid43 2 жыл бұрын
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
@johnray527
@johnray527 Жыл бұрын
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.
@donskiver
@donskiver 2 жыл бұрын
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.
@Phoboskomboa
@Phoboskomboa 2 жыл бұрын
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
@lovedeath9075
@lovedeath9075 2 жыл бұрын
It would be cool to compare code from different versions of Monopoly and see how the algorithm has changed
@samuelthecamel
@samuelthecamel 2 жыл бұрын
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 2 жыл бұрын
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.
@thomashorine9198
@thomashorine9198 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
Jail is absolutely the factor. Even in a two player game it seems like we're in jail every third turn!
@bnasty267
@bnasty267 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
@@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. kzbin.info/www/bejne/r5zXmKSZaZdmnsk
@AGMS00
@AGMS00 2 жыл бұрын
@@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.
@nicrule4424
@nicrule4424 2 жыл бұрын
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 2 жыл бұрын
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
@xotmatrix 2 жыл бұрын
Thanks for this analysis. NES Monopoly doesn't get enough love.
@joshmyer9
@joshmyer9 2 жыл бұрын
I opened up KZbin 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
@WhoIsRyanFox 2 жыл бұрын
"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 2 жыл бұрын
In the dev's defense, math is hard.
@Chronosv2
@Chronosv2 2 жыл бұрын
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.
@PlasticCogLiquid
@PlasticCogLiquid 2 жыл бұрын
Bill Williams is the genius that made Alley Cat
@VinsCool
@VinsCool 2 жыл бұрын
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
@GHKuinli
@GHKuinli 2 жыл бұрын
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 7 күн бұрын
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
@jamesmcphee2855
@jamesmcphee2855 2 жыл бұрын
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.
@Chronosv2
@Chronosv2 2 жыл бұрын
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!
@Acoha7
@Acoha7 2 жыл бұрын
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.
@homestar92
@homestar92 2 жыл бұрын
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!
@sanderbos4243
@sanderbos4243 2 жыл бұрын
This was an awesome explanation, thank you for putting so much effort into the presentation!
@GrayBlood1331
@GrayBlood1331 2 жыл бұрын
I really love these code walks, which is good news for you since it means you'll have an endless supply of content!
@TroyFullwood
@TroyFullwood 2 жыл бұрын
this is wanna my fav ports! really well put together
@sagacious03
@sagacious03 Жыл бұрын
Neat analysis video! Thanks for uploading!
@LegendBegins
@LegendBegins 2 жыл бұрын
I always look forward to this series! Thanks for diving into the code so we don’t have to!
@DisplacedGamers
@DisplacedGamers 2 жыл бұрын
There was definitely a moment with Monopoly trade code where I had to decide IF I wanted to see the thing through or not.
@trippe2k
@trippe2k 2 жыл бұрын
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.
@Paul-qg3iw
@Paul-qg3iw 6 ай бұрын
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!
@NTSTS0
@NTSTS0 Жыл бұрын
This is one of the coolest NES code dive videos I've seen.
@Nomadnetic3
@Nomadnetic3 2 жыл бұрын
This is excellent, great job on your analysis!
@TheVideogamemaster9
@TheVideogamemaster9 4 ай бұрын
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
@licksorestockpile1190
@licksorestockpile1190 2 жыл бұрын
really love these videos!!
@Dinnye01
@Dinnye01 2 жыл бұрын
Daaamn. You got recommended under an MVG video. I am glad I clicked. Instant subscribe!
@alexanderyoung5785
@alexanderyoung5785 2 жыл бұрын
I grew up on this exact game, glad to hear so many others cherish it as well
@arthurhenriqued.a.ribeiro2078
@arthurhenriqued.a.ribeiro2078 2 жыл бұрын
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!
@aegisofhonor
@aegisofhonor 2 жыл бұрын
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.
@hugoboyce9648
@hugoboyce9648 2 жыл бұрын
Great video!
@tomsko863
@tomsko863 2 жыл бұрын
YAY, Babylon 5 Reference! You have my eternal subscription now. "I see a great hand, reaching out of the sky"
@DisplacedGamers
@DisplacedGamers 2 жыл бұрын
Yes! I am glad you caught that!
@tomsko863
@tomsko863 2 жыл бұрын
​@@DisplacedGamers I see it in places it usually doesn't exist. FYI, Mira Furlan died recently :(
@Twenty_Six_Hundred
@Twenty_Six_Hundred 2 жыл бұрын
Love your videos. Fun fact: The NES version is one of the fastest flowing ports of Monopoly
@DisplacedGamers
@DisplacedGamers 2 жыл бұрын
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 2 жыл бұрын
@@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 2 жыл бұрын
Same here, I can fly through a game with 7 CPU opponents in like 20-30 minutes.
@coreybarnett2158
@coreybarnett2158 2 жыл бұрын
Loved this game growing up. I really appreciate the game more knowing the lengths the developer went to programming the AI.
@fbodirector7464
@fbodirector7464 2 жыл бұрын
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.
@SaberKittyZero
@SaberKittyZero Жыл бұрын
OMG I actually remember this game. Played quite a bit of it when I was a kid.
@jansenart0
@jansenart0 2 жыл бұрын
This is such an underrated video. NES Monopoly ought to blow any programmer's mind.
@philcooper9225
@philcooper9225 2 жыл бұрын
I've spent a decade in IT but I never wanted to learn about code until I found your channel
@Fender178
@Fender178 2 жыл бұрын
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.
@_digitalcoffee
@_digitalcoffee Жыл бұрын
This is the video which earned you my subscription. Bravo Zulu.
@Sixfortyfive
@Sixfortyfive 2 жыл бұрын
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.
@ArborDaze
@ArborDaze 2 жыл бұрын
This was beautiful.
@breawycker
@breawycker 2 жыл бұрын
This is so cool!
@bertfromseasamestreet
@bertfromseasamestreet 2 жыл бұрын
Cool vid!
@PotbellyPunch
@PotbellyPunch Ай бұрын
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.
@Controllerhead
@Controllerhead 2 жыл бұрын
Intense video! Loved it. ASM routines are fun to design, but, i have a much greater appreciation for higher level languages now =)
@ItsHyomoto
@ItsHyomoto 8 ай бұрын
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.
@Greatfox54
@Greatfox54 2 жыл бұрын
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.
@wknight8111
@wknight8111 2 жыл бұрын
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.
@RobertDunn310
@RobertDunn310 2 жыл бұрын
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 KZbin videos have ever managed to do.
@RichardCraig
@RichardCraig 2 жыл бұрын
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.
@eldergoth5925
@eldergoth5925 Жыл бұрын
Fascinating.
@skins4thewin
@skins4thewin 2 жыл бұрын
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.
@huckleberryfinn8795
@huckleberryfinn8795 Жыл бұрын
I loved that game!
@kri249
@kri249 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
@@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 2 жыл бұрын
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
@RogueBagel
@RogueBagel 2 жыл бұрын
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.
@DoomRater
@DoomRater 2 жыл бұрын
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.
@beatchef
@beatchef 2 жыл бұрын
When I hear this music 0:47 I'm expecting 8-Bit Guy to be getting excited about a computer and retrobriting it. 😁
@5371W
@5371W 2 жыл бұрын
I know nothing about coding and am even less about math, but all these videos are so interesting to me.
@anon_y_mousse
@anon_y_mousse Жыл бұрын
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.
@kingawsume
@kingawsume 2 жыл бұрын
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.
@robertrocheville7769
@robertrocheville7769 2 жыл бұрын
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.
@SpockvsEgon
@SpockvsEgon 2 жыл бұрын
I discovered that if the AI proposes a trade, as long as you don't remove the item they asked for or request another property in that same family or a property that has been built on, you can request that the AI give you all the rest of their money and assets, and they will always accept the trade. For instance, the AI requests one of your green properties to go with its green properties. You counter offer by requesting all their money and all their properties except the green ones, and the AI will always accept. This works on the NES and Genesis versions.
@licksorestockpile1190
@licksorestockpile1190 2 жыл бұрын
glad you included the speedrun exploit!
@DyrianLightbringer
@DyrianLightbringer 2 жыл бұрын
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
@xdonthave1xx Жыл бұрын
One of my aunts had this game. Sometimes when I would visit, I would set it up to all AI and just watch.
@outseeker
@outseeker 2 жыл бұрын
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
@breathstealer5486
@breathstealer5486 Жыл бұрын
Seeing the monopoly scores just help vindicate that I've been playing monopoly correctly all these years. Orange properties must be acquired
@alessandrorossi1294
@alessandrorossi1294 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
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
@catholiccontriversy
@catholiccontriversy 2 жыл бұрын
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.
@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.
@joshd2538
@joshd2538 2 жыл бұрын
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.
@theraven1120
@theraven1120 11 ай бұрын
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)?
@ferceron8992
@ferceron8992 2 жыл бұрын
This video is so informative, but first, we need to talk about parallel properties...
@hgbugalou
@hgbugalou 2 жыл бұрын
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!
@torarinvik4920
@torarinvik4920 2 жыл бұрын
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.
@RetroPlayer4000
@RetroPlayer4000 11 ай бұрын
I actually filled out the forms for creator application at the Beverly mass MB Office
@TheDeelunatic
@TheDeelunatic 2 жыл бұрын
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.
@christopherschumacher2649
@christopherschumacher2649 2 жыл бұрын
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.
@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?)
@Medinaxz
@Medinaxz Жыл бұрын
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.
@FrankWolfeUDL
@FrankWolfeUDL 2 жыл бұрын
this game has a fun achievement set on Retro Achievements!
@rolen47
@rolen47 2 жыл бұрын
I loved this game, beat it several times and always remembered that the computers were really terrible at keeping good properties. All they wanted was just cold hard cash and it was very important to make sure that they never get the ability to place houses/hotels. Trading early and making sure you had at least 1 property of each color would almost always guarantee you'd win eventually. Even if you have to mortgage your properties to secure 1 of every color it was worth it.
@TetrisMaster512
@TetrisMaster512 2 жыл бұрын
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.
@retrogamestudios7649
@retrogamestudios7649 Жыл бұрын
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
@Chubby_Bub
@Chubby_Bub Жыл бұрын
The way the speedrun technique tricks Ollie is pretty funny. I wonder how difficult it would be to change the AI so that it also took into account its own money.
@TheBlueArcher
@TheBlueArcher 2 жыл бұрын
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...
@michaeldew7904
@michaeldew7904 2 жыл бұрын
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.
@fromthegamethrone
@fromthegamethrone 2 жыл бұрын
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.
Action 52 - A Bit of History & A Bit of ROM Archaeology
18:06
Displaced Gamers
Рет қаралды 182 М.
My little bro is funny😁  @artur-boy
00:18
Andrey Grechka
Рет қаралды 13 МЛН
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 49 МЛН
FOOLED THE GUARD🤢
00:54
INO
Рет қаралды 63 МЛН
MSX Computers - Scrolling, Sprites, and Stereotypes
31:02
Displaced Gamers
Рет қаралды 283 М.
The Hidden Source Code in Dragon's Lair (NES)
20:29
Displaced Gamers
Рет қаралды 156 М.
Zelda Drops and RNG - Behind the Code
23:33
Displaced Gamers
Рет қаралды 55 М.
Harder Drive: Hard drives we didn't want or need
36:47
suckerpinch
Рет қаралды 1,6 МЛН
Monopoly Turn 1 Victory
26:40
The Spiffing Brit
Рет қаралды 6 МЛН
I made my own Monopoly (Communistopoly)
8:01
Ari Cagan
Рет қаралды 3,7 МЛН
NES Sound: The DMC - Behind the Code
33:48
Displaced Gamers
Рет қаралды 125 М.
Reverse Engineering Game Code from the Neutral Zone
40:59
Retro Game Mechanics Explained
Рет қаралды 546 М.
Mega Man 2 - Quick Man A.I. Explained - Behind the Code
19:29
Displaced Gamers
Рет қаралды 122 М.
ВЫПАЛ НОВЫЙ БРАВЛЕР БЕРРИ В BRAWL STARS
14:25
СМОТРИ, КАКОЙ ВКУСНЫЙ ПИРОЖОК!
12:56
ViteC ► Play
Рет қаралды 1,2 МЛН