EDIT: I think I've found the cause for the bug I'm describing at 23:44. This happens when the dealer uses beer in conjunction with magnifying glasses. The dealer uses the MG, sees it's a blank, then uses beer. The beer ejects the round, but does not clear the "known round" flag, which only gets cleared after a shot. The dealer has another magnifying glass, but he still thinks he knows what the round is and thinks it's a blank. So if I'm understanding this correctly, MG into beer from the dealer will always result in dealer shooting himself and will not use another MG, unless he gets to the final shell in the loadout, in which case his "known round" flag gets reset to whatever the actual last shell is. I think this is actually a useful thing to know. A couple clarifications: 18:48 - I say that cigarettes don't really matter because he may not get a turn. This is obviously true for all items, so I meant he may not get a turn where he is damaged to use them. I.e. you may miss, then he goes and can't use cigarettes since he's still at full health, then you deal enough damage to kill him, or deal damage then go to the next loadout. 23:44 - The scenario I'm talking about here is that I think I've seen him use a magnifying glass, see a blank, shoot himself, then not use another magnifying glass and just shoot even though he has another magnifying glass. Almost all of the time he uses the 2nd magnifying glass here, but I think at least once he hasn't. It's strange because I don't see what's causing that in the code.
The game description calls him "crooked" despite the fact he plays completely fair. My guess is that he doesn't bother to count the bullets he just cheats and looks at the last one and memorizes that one instead.
I mean that is still technically fair. We count all of the shells too. Knowing the last shell after every other one is expended is probably the easiest.
@@KENNYd04360 The dealer wouldn't know, it only knows the last shell, since it's code and not a person, It doesn't count what has been fired. As far as it knows, there may be 2 blanks or 2 lives, rather than just 1 blank and 1 live, which you can easily get by paying attention to how many of each shell was loaded (the dealer does not know what has been loaded, only that last shell).
The best description I've heard of the TL;DR of how the dealer works is from Markiplier. "This guy...this guy's bold. He's VERY bold. He's not SMART.....but he's bold."
Sounds like your typical lucky freind who manages to kill 6 bosses at once because he wants to clear out a village, and you're just stuck thinking, WHY AND HOW DID YOU DO THAT
@@deyontemyers4109 me after beating viper on master with scorch after 10 tries And then coming back a year later and taking a bazillion tries to repeat it
some things i've noticed about dealer in the update: 1. he now knows when there are only blanks or only lives left 2. he never uses expired medicine if he's at 1 health 3. if he's taken any damage, he will always use expired medicine unless he has a cigarette 4. he still drinks a beer after using a magnifying glass, in fact, if he has adrenaline, he'll steal your beer instead of just shooting himself
7:28 that's wrong, actually. it's a 100% chance of being a blank if i point it at the dealer and 100% chance of being live if i point it at myself. at least, that's how it felt in my playthroughs
I honestly feel as if that’s what’s happening, not in the code, but in the game’s universe. We already know that the Dealer has fought God, and won which means that when he’s fighting the player, he’s most likely just dicking around. If he loses, it’s just money, which is pretty inconsequential when considering the type of being that he is. Although, I think we all know that the real God is the player character, as they are the only one with the capability to beat the dealer, no matter how many times they have to reset. It doesn’t really make sense how the dealer could kill god, because if the dealer killed god, he kills himself too. It would be like a person’s alter ego killing the body that it resides in, like congratulations dumb ass, you fucked yourself.
@@santini1224434never thought of it that way. Still fits the idea of gambling and from what i feel like the meaning of the game is how gambling is toxic/deadly when addicted to it ya know
I love when people are so passionate about games when they decide to crack the entire game open and look through and see how the game works, down to values and how it can boil down in future plays. Glad this is getting recommended. Hope you do this more for future interesting games.
@@flamingdog9207 You might want to check out "Tech Rules" then, he's done videos on the AI of Five Nights at Freddy's as well as Baldi and they're both very interesting :)
i wonder if the dev will add in a "hard mode" where he actually counts the shells like a human would and just. . . generally be smarter. that'd be cool to see
@@ambi_cc8464 and it wouldnt be that hard. Instead of randomly deciding, the odds of shooting the player is live rounds/total rounds, if dont shoot player shoot self
Personally, I don't like the idea of "normal' mode & hard mode in these kind of games, as it's practically pointless when you want to feel the experience. If smarter AI would be implemented, I hope it would be replace the old one, as in intended difficulty.
I played this game with my friend and we laughed our heads off when the Dealer decided to shoot itself after checking what kind of round was in the chamber. I really hope they can implement a 2-player mode so that we could play this against friends, it would raise the replay value significantly
The developer’s gonna watch this and take notes. I know the dealer makes the best possible decisions in every circumstance, but it would be so cool if the Dealer takes into account both his AND your items. And every time you play, yours and his decisions as well as items used from the last games gets saved into the AI’s memory. And so the Dealer is able to 1 up you in the next game in any way he can. Thanks for clarifying your 2nd observation. It didn’t make sense to me.
the goal of game dev is to create an enjoyable and exciting experience. If the dealer acts optimally, the game would be boring, predictable and hard. So probably not gonna make it too smart.
To be fully honest I have no problem dealing with him myself, but this video was still amazingly nice to watch. Very good, high quality and informative. Keep up the good work mate!
Eyy, great job with the game, man! I've been loving it. Glad you enjoyed the vid! Probably goes without saying that calling the AI dumb is by no means a criticism of the game, honestly makes it more fun to try to game it for high scores 👌
I've looked at some of the code myself, and it seems to me he prioritizes items in the order he got them. Naturally, you can't see the specifics of this order in game, because you're getting your own items in that time. But it should become apparent from one turn to the next (I think). EDIT: oops, you talked about that! yay datamining. I also noticed some weird code that seems to add and remove cigarettes from the item pools based on, I think, the amount the dealer gets? I didn't quite understand what that code did, probably for either fairness or keeping rounds from dragging out too long. I love the explanation with expected value and building up from the simpler two-shell scenario. Way clearer than trying to simultaneously think about like eight possibilities for the odds.
@@alien3200 You can Google reverse engineering tools for Godot (the engine Buckshot Roulette was made in). It generates a slightly-incomplete project file that you can then open in Godot and get the code from.
The fact that he doesn’t count cards and just checks the last round he puts in so he knows what to do at the end despite that not being the best play kind of characterizes him as being cocky and thinking that he’s pulling one over on you by cheating even though he’s actually stupid, which makes sense for a character that would play a game like this. I love that. It’s characterization and storytelling through game mechanics that you’d have no idea about unless you crack the game open and see how he’s making his decisions. If you can see into his head and know how he thinks, then you get a feel for what kind of person he is, but you’d never know by just playing the game unless you played for a really long time actively trying to figure him out.
Yeah no imo that's a godawful reading trying to tie how it works behind the scenes in the code into actual game characters, the dealer plays fair, and that makes it a way more interesting character than if it was just cocky and trying to subtle cheat, the reason why in the code the dealer knows what the last round is is cus literally any player would be able to deduce that, as the video explains, the fact it knows what the last shell is only comes into play WHEN the last shell in the round is being played, so it's fair to assume that it knows that through simple deduction skills, if there were 4 lives and 3 blanks you'd know what's the last round if 3 lives and 3 blanks were shot
@@azurabbit12 you’d also know what rounds are in the gun if there’s only two live rounds left, but the dealer doesn’t. Sometimes he’ll still choose himself even when there’s only live rounds and sometimes he’ll choose you even when there’s only blanks. You can tell he’s not using intuition to deduce the rounds remaining in the gun because there are times when he would have information if he were using deduction, but by his actions you can tell that he doesn’t have that information, so he must not be using deduction. He cheats, checking the last round to know what it is without realizing there’s an easier way to get more information. This demonstrates that he’s a bit of an idiot, and he never realizes his mistake even after seeing you absolutely thrash him, so there’s probably a bit of ego in the way of him realizing his mistake.
@@talongreenlee7704no, the person you replied to is right. The reason the dealer can make a mistake when there's 2 live rounds was simply because the person who made the game didn't want the dealer to "count cards" during the game and simply only know the last round for balance reasons. In the same way anyone could figure out what the last 2 shells are, people make mistakes, and can misremember the ratio or number of shells total. It makes sense that the dealer doesn't have a perfect memory because humans don't either. Equating fair or even lazy game design as cannon lore doesn't make sense to me, if it was a higher budget game or something I might expect them to put more thought into how ai patterns affect lore.
I like how rule number 2 happens before rule number 3, and rule 1 happens before either (the dealer will use a magnifying glass and then a beer despite rule 3 saying he can just shoot himself- he has more items to use dammit)
@@endieisfridgeconfirmed The point is that they don't happen in a sequence per item, they always take priority even though logically using a magnifying glass should dictate the rest of the turn order once used
I think its actually good that the dealer is a little bit stupid. If the dealer played optimally and the player plays optimally, then the entire game just becomes pure chance. If the player is playing sub-optimally, which is the case probably 90% of the time, then the dealer has a big advantage. If the dealer is a little dumb, then it gives more room for the player to play smart and increase their odds of winning. You want player choices to matter, that's the whole point of a game.
@@jasonslade6259 The problem is that the game is not that complex to begin with. Rounds with a lot of cartridges and items could be much more fun if the opponent tried to appear slightly more intelligent. The current version of the game is heavily skewed towards the player, and that affects replayability a lot.
In the newest version of the game in the Double or Nothing, the dealer does count how many bullets are left (i.e. 8 shells, 4 live, 4 blank, 2 lives have already been fired, the dealer will choose to shoot self because it's a greater chance the shell is a blank)
The fact that the dealer would do the 50/50 even if the bullet type is easy to figure out but either not the last or mg’d makes me wonder if there will ever be a version of the ai made that does count the bullets and makes decisions on that basis
That would be easy to implement too. 1) Count all blank and real shells in the beginning. 2) Substract each type of shell when used accordingly. 3) Instead of doing 50/50 random roll, do the roll according to blank/real ratio to do a specific algorithm (yourself/opponent). I am kind of surprised they didn't implement it.
@@DeonGamingtechnically, in code it wouldn't be that. It just needs to track live rounds and remaining rounds, and then, pick a random integer between 0 and remaining rounds, inclusive. If the random is less than live round, shoot enemy, else shoot self
I'd be interested to see a mod where the dealer actually uses minimax (or expectiminimax, as the case would be here). Though I imagine that his behavior here is better for average game balance.
@@rick30521 Chess against an AI is impossible because chess is not a game of chance. Faced with both random items and a hidden random shell order, the AI is just going to do the best with what it's got, which may not be much.
Thank you for this! This is a wonderful look into how it works, and you present it in an entertaining and easy to follow way. Part of me is interested in seeing a mode where the dealer actually keeps odds in mind (being able to use the same logical deduction we have, like in the 1 live/2 dud, seeing a dud go off, and knowing that there's a 1/2 chance) - but I understand there's a difference between realistic AI and an AI that's actually fun to play against, and I'm not sure where a more realistic AI logic would fall.
Really appreciate it! And yeah, I was thinking a similar thing. Was gonna try and write a bot to play the game in a smart way using monte carlo simulation, so maybe I'll actually follow through with that but try and plug it into the dealer AI instead lol.
Commenting from the future to note that I'm pretty sure in the Steam version's Double Or Nothing, Dealer actually keeps count of the shells in the gun. If there are more live shells than blanks left, he always shoots you. If there are more blanks, he always shoots himself (or inverts and then shoots you). And I think if there's an equal number of live and blank, he does a coin flip. That's just me guessing based on my observation, so I could be wrong though!
Thanks for the online lesson, teacher! You honestly have a really nice "no bullshit" charm to how you explain things in this video, so I might actually check out your channel!
11:01 “now heres the thing; that’s stupid actually. (sorry.)” had me cracking up, new sub 🙂 edit: also this is a great video on a nice topic, i look forward to seeing what else you create
I'd love to see a new writeup for the updated versions, including the Double Or Nothing mode where the dealer can use the burner phone item to gain information on a random upcoming shell. As well as the general AI changes, like him being able to count the rounds.
This keeps coming up in my recommended lol. I have never played this game, I don’t know what’s happening. Coming from a CS background though, I love the code analysis.
Yeah haha, kind of have a split audience between BG3 and this game rn. But same! I'm actually a software engineer, cool that you're in the same field 👌
If I were to write a smarter AI pattern, it would go something like this: 1. If any health is missing, use cigarettes. 2. If there are at least 2 shells remaining, use magnifying glass. 3. If current shell is determined to be live, use handsaw. 4. If at least one other live round is remaining, use handcuffs. 5. If the current round is determined to be live, fire at opponent. 6. If the current round is determined to be blank, fire at self. 7. If the current round is undetermined but the ratio of remaining blanks to live rounds is 50% or greater, and there is more than one shell remaining, use beer. 8. If the current shell is still undetermined, choose randomly to fire at opponent/self based on current ratio of remaining live/blank shells. Maybe not the most optimal AI, but probably still harder to beat than the current one.
yeah, that AI would probably be REALLY difficult to play against. I'd imagine that to be a "Hard Mode" game play wise. And then in the "Very Hard Mode" the dealer will know what the last shell in the tube is, and plan his game around that as well.
@@Kalmaro4152that AI covers for a last-round situation, since the last round will either be 1:0 or 0:1 ratio and its guaranteed to play properly with it
I've always found it interesting that since the dealer knows the last round every time it implies they are counting the rounds, but do a coin flip to give you chance to win. Like with casinos stopping at 17 for black jack
I remember two weeks ago people were specifically calling this dealer AI "smart", and now that the behavior is cracked it instantly becomes dumb. How funny things turn out in very short periods of time.
ManlyBadassHero won his first playthroughwith the Dealer commiting scooter ankle, despite the only possible shell being live. The Dealer bumping himself off after smoking 2 cigs and downing 3 beers, each one skipping a blank, with only 1 shell left, Manly went from "oh, this is gonna hurt" to "guess not". Then he did something similar in the third video and Manly cracked up.
For the example at 12:00, it helped me when I wrote it out to find that the Self shoot had an expected value of 1/3 to give -1 and a 2/3 to give 0. The second turn, assuming the worst doesn't happen, is always 50/50. This means that shooting yourself on a 1Live 2Blank isn't going to help you get an advantage; it will just be a risky chance to break even. On the flipside, it's bad for the Dealer if you choose to shoot him, with even the worst case scenario having you break even. The step between the shells available and the final expected value made understanding your explanation confusing until I got this.
Good video, made me want to mod the game and fix the bug + make the dealer smarter ^^ Did a stream of it yesterday, but managed to mess up the calculations a little bit so gotta try again today.
There is a proper order to use the items. Starting cigs. If you have less than max health, use one. Next with the beer. Use in only two scenarios. If there is only one live round left regardless of number of blanks, or if all remaining rounds are live unless it's the last bullet or handcuffs are in play. Then comes the magnifying glass. Now comes the handcuffs, if the current round is live and the next is unknown or live, use them. Finally, comes the saw. If the current round is known to be live, use it. Now, if it's live, fire at the dealer, if a blank, fire at self, and if unknown, fire at the dealer.
I have seen him use a magnifier, saw the shotgun, beer out a live round, point it at himself and get hit by a live round. Clearly it must have been a bug because it made no damn sense.
The dealer drinking beer to eject a blank shell could be representing addiction. Kind of like how he’ll still use cigarettes after the defibrillator wires have been cut.
Is this video up to date? The AI seems a lot more advanced now. His item usage is consice, especially now that there are addictional items than what's mentioned in the video. He also seems to be playing the odds to his advantage very consistently.
I think that they should allow the dealer to count the shells as well, like players do. It'd make him do more informed decisions. And the chances will always be in the player's favour because the player always has the first turn. But giving him the ability to count and perhaps to use items more optimally would even the playing field more between player and dealer. Because, if you play optimally, unless RNG screws you over, you will win almost every time. It would make the game more intense.
I saw him use a magnifying glass and then immediately pop a can of beer to eject a live shell lmao, so that random order rule REALLY screws him over big time
The fact that he uses the items in the order that he got them and as soon as possible explains why the dealer sometimes handcuffs the player only to do the 50/50 coin flip on himself.
Personally i have seen him check the shell with a magnifying glass, see that it’s a live shot, then shoot himself and i won the game. There must be some kind of bug where he “forgets” what shell there is
Heads up: The AI works slightly differently in DoubleOrNothing mode in the full game. He counts the shells remaining in the gun and aims according to how many shells of each types there are left.
With the release of the Steam version of the game, playing the Double Or Nothing gamemode, there is something that I've encountered. For 4 shells in a row, without using a single item, he knew exactly what they were. He Managed to "shoot" himself with 3 blanks in a row, and then pointed the shotgun at me and shot me with a live round. The kicker? It wasn't the last round that he shot me with, it was the 5th round out of 7. So, either I'm just stupid unlucky or I encountered a glitch of some sort
From what I understand, what makes him exploitable is how he does coin flips for every turn outside of magnifying glasses or the last shell, meaning he has no concept of what the odds are. So for example, let's say you know that there are 4 lives and 4 blanks. 2 blanks were used, there are now 4 lives and 2 blanks. It is highly likely that the next shot is a live one. But the Dealer still sees this as a 50/50 coin flip in his case, so despite it being of higher value to take the chance to shoot you, there's still a chance he'll waste a life of his own anyways. So if you want to win, just keep playing into the odds. Even if the odds weren't in your favor in this scenario and you took a hit, he still is more likely to shoot himself when there are still more lives than blanks.
Howdy. Great video, big tip if you ever make a similar kind of Game Theory video, it will help immensely to utilize payoff matrices. That way the viewer can easily read the strategy to payoff values as your talking them out. Instead of just the “Expected value is X”
If i remember correctly, I watched Joe Bartolozzi play Buckshot roulette, The Dealer had used almost all of his items and joe was already saying that he lost the whole thing. But when the dealer KNEW what the shell was (Because he used the magnifying glass). He used a Saw, Smoked, And handcuffed Joe. And which the Dealer Stupidly pushed the "Cancel Subscription" button on Life. Joe, And everyone was shocked. (Note: This is from memory which means this probably isn't true :/)
1. dealer uses items as soon as possible usually, unless it does nothing like healing at full health or using magnifying glass twice 2. dealer uses item in mostly random order 3. after using magnifying glass the dealer will act accordingly like blank + shooting himself 4. if dealer doesnt know next shot no matter what he will flip a coin to see, head shoot you tails shot himself 5. dealer always knows the last shell 6. dealer only knows next bullet when its the last shell or when using magnifying glass
I recently bought the game, and had an interesting moment in final round. Me and Dealer was on last hp. In the chamber left 3 shells and 2 blanks. I used handcuffs on him and tried to shoot him. Twice. Both of them was blank. And when Dealer began its turn, I thought: "That's it, I'm dead", but suddenly he drank beer, and then shooted himself. I was both disappointed and happy, that I won. It was my first playthrough tho.
I feel like even just a couple lines of code could make the AI much smarter, and I really do mean a few lines. Instead of 50/50 on unknown shells, the dealer could just use probability. Like we know how many shells are left and what is left, but not whats next (usually). You wouldn't even need to actually calculate the real probabilities. Assuming that there is 2 blank shells and 1 live shell in the tube, and its the dealers turn, the code in LUA could look like; Blank = 2 Live = 1 if Blank > Live then shootSelf() elseif Blank < Live then shootPlayer() if Blank == Live then flipCoin() end In the example, since there are more blanks, the dealer would shoot itself. Now obviously you could go into more detail, have the AI actually calculate real probability, maybe even take into account what the last shell was as well.
Great video! Thanks for the information saw your post on reddit. You earned a subscription. I noticed in your high score video you said that the cigarettes lose you points, do you think you could make a video going in depth about what makes you losing points and what makes you gain points? I think that would make for a great video!
the script is named 'DealerIntelligence' lol. I suppose the perfect the dealer would need to evaluate a tree of possible future gamestates... maybe a genetic algorithm could produce something that can look at it's opponents items and it's own and use this information in an impactful way.
I think the game is simple enough you could get some pretty good results with a monte carlo simulation. Even a heuristic to just always shoot the player would make him way more lethal lol. But I'm not sure improving the AI would even improve the game, would be way harder to make it through rounds.
I'm guessing him knowing the last shell is supposed to be representative of him keeping perfect count. But as someone who's worked as a programmer, I'd just tell him what's at the end of the array rather than write a whole damn counting routine.
Yeah, especially since none of that counting is used anywhere in his ai. You dont just go make a whole logic when you can replace it with a simple hardcoded behaviour that is always appropriate for what you need anyway.
Honestly, even if the creator improves the AI, adds more items, more variation to the gameplay, I still wouldn't want it to be perfect or human-like. With games like these, part of the fun is to find exploits in the AI and "Conquer" it. The only thing that could be better is "Other modes" or "Other dealers", as in, versions of the dealer that have a different AI to figure out, like a puzzle.
as a notice gamedev I find it really interesting that this simplistic AI is actually the best choice for this game given it makes the game more possible than if the AI played 100% "optimally"
EDIT: I think I've found the cause for the bug I'm describing at 23:44. This happens when the dealer uses beer in conjunction with magnifying glasses. The dealer uses the MG, sees it's a blank, then uses beer. The beer ejects the round, but does not clear the "known round" flag, which only gets cleared after a shot. The dealer has another magnifying glass, but he still thinks he knows what the round is and thinks it's a blank. So if I'm understanding this correctly, MG into beer from the dealer will always result in dealer shooting himself and will not use another MG, unless he gets to the final shell in the loadout, in which case his "known round" flag gets reset to whatever the actual last shell is. I think this is actually a useful thing to know.
A couple clarifications:
18:48 - I say that cigarettes don't really matter because he may not get a turn. This is obviously true for all items, so I meant he may not get a turn where he is damaged to use them. I.e. you may miss, then he goes and can't use cigarettes since he's still at full health, then you deal enough damage to kill him, or deal damage then go to the next loadout.
23:44 - The scenario I'm talking about here is that I think I've seen him use a magnifying glass, see a blank, shoot himself, then not use another magnifying glass and just shoot even though he has another magnifying glass. Almost all of the time he uses the 2nd magnifying glass here, but I think at least once he hasn't. It's strange because I don't see what's causing that in the code.
This happened in Nogla's 14mil game, dealer had two MGs but still immediately shot himself.
@@trevorhaddox6884 Interesting! Now to report to the dev or to keep as a little secret exploit among friends, decisions decisions... 🤭
He got intoxicated and forgor (skull emoji)
Why does this only happen some of the time then?
"I don't see what's causing that in the code" relatable
The game description calls him "crooked" despite the fact he plays completely fair. My guess is that he doesn't bother to count the bullets he just cheats and looks at the last one and memorizes that one instead.
I mean that is still technically fair.
We count all of the shells too.
Knowing the last shell after every other one is expended is probably the easiest.
@@godknightomega Though he should know if all blanks or live rounds are out as well.
i mean, if its 3 live 4 blank and youve shot 4 blank 2 live, its not too hard to figure out what it is
@@MyMika2004 Right, but if 3 blank and 1 live are out, the dealer know in what order the bullet will come !
@@KENNYd04360 The dealer wouldn't know, it only knows the last shell, since it's code and not a person, It doesn't count what has been fired. As far as it knows, there may be 2 blanks or 2 lives, rather than just 1 blank and 1 live, which you can easily get by paying attention to how many of each shell was loaded (the dealer does not know what has been loaded, only that last shell).
The best description I've heard of the TL;DR of how the dealer works is from Markiplier.
"This guy...this guy's bold. He's VERY bold. He's not SMART.....but he's bold."
Sounds like your typical lucky freind who manages to kill 6 bosses at once because he wants to clear out a village, and you're just stuck thinking, WHY AND HOW DID YOU DO THAT
@@deyontemyers4109 me after beating viper on master with scorch after 10 tries
And then coming back a year later and taking a bazillion tries to repeat it
Not just "bold" bald too (yes I did do that joke)
@@Helpertf2Booo...
👎
Lol
I once saw a dealer chug 3 beers and shooot themselves. He was owned so hard he decided to quit.
He's just like me
Did you see that from Manly's playthrough?
@@tenyearsinthejoint985 how did you know?
@@malfolin It was quite famous
How many dealers?
some things i've noticed about dealer in the update:
1. he now knows when there are only blanks or only lives left
2. he never uses expired medicine if he's at 1 health
3. if he's taken any damage, he will always use expired medicine unless he has a cigarette
4. he still drinks a beer after using a magnifying glass, in fact, if he has adrenaline, he'll steal your beer instead of just shooting himself
so basically he can count now, and he's heavily addicted to beer
Idk, I played against him today, and he killed himself with the medicine during round 2
@@swiggityshooty3632 hmm
i guess it might be possible, but very unlikely
so an alcoholic with a shotgun fetish?
@@zakutskovomg just like me
In practice the handcuffs and cigarettes are the worst thing for the dealer to get, because they will always use them optimally.
To be fair, how do you even use cigarettes unoptimally?
To be fair, how do you even use cigarettes unoptimally?
@@lighterflud Using them when you are at full health
But spy glasses and saws get you killed
@@lighterflud or not using them immediately when injured, because sometimes the one health matters next opponents turn
7:28 that's wrong, actually. it's a 100% chance of being a blank if i point it at the dealer and 100% chance of being live if i point it at myself. at least, that's how it felt in my playthroughs
Real
I honestly feel as if that’s what’s happening, not in the code, but in the game’s universe. We already know that the Dealer has fought God, and won which means that when he’s fighting the player, he’s most likely just dicking around. If he loses, it’s just money, which is pretty inconsequential when considering the type of being that he is. Although, I think we all know that the real God is the player character, as they are the only one with the capability to beat the dealer, no matter how many times they have to reset. It doesn’t really make sense how the dealer could kill god, because if the dealer killed god, he kills himself too. It would be like a person’s alter ego killing the body that it resides in, like congratulations dumb ass, you fucked yourself.
@@speeddemon5339i always thought of the "God" waiver as just someone who thought of themselves as unable to lose, but at the end they died anyways
@@santini1224434never thought of it that way. Still fits the idea of gambling and from what i feel like the meaning of the game is how gambling is toxic/deadly when addicted to it ya know
@@santini1224434unfortunately the death cutscene shows you heaven, abandoned and in complete disarray, which means the actual god lost : /
I love when people are so passionate about games when they decide to crack the entire game open and look through and see how the game works, down to values and how it can boil down in future plays. Glad this is getting recommended. Hope you do this more for future interesting games.
Thank you! 🙏 Was thinking about doing just that, I find it really interesting to see how devs code in general, especially AI
@@delightfulkissboy8926 keep it up gang, would like to see you dissect sometime like F.E.A.R'S ai or Half life 2's source engine capabilities.
For whatever reason, I find looks under the hood in games like this really interesting, seeing how a game's AI works, what makes it tick, etc.
@@flamingdog9207 You might want to check out "Tech Rules" then, he's done videos on the AI of Five Nights at Freddy's as well as Baldi and they're both very interesting :)
Now I'm addicted to booze, drugs, and gambling, but in this life that's an optimal strategy.
i wonder if the dev will add in a "hard mode" where he actually counts the shells like a human would and just. . . generally be smarter. that'd be cool to see
fr lol
@@ambi_cc8464 and it wouldnt be that hard. Instead of randomly deciding, the odds of shooting the player is live rounds/total rounds, if dont shoot player shoot self
Personally, I don't like the idea of "normal' mode & hard mode in these kind of games, as it's practically pointless when you want to feel the experience. If smarter AI would be implemented, I hope it would be replace the old one, as in intended difficulty.
they should make it calculate the chances before rolling the dice too, thatd significantly help him in gambles
the dev could probably also make a nightmare difficulty by having him consider every items on board including the player's
With this knowledge out, I am become dealer, destroyer of high scores
Oppenheimer if he was a gambler:
@@fluoxvonhoovienheimer4706it was openheirmer who said that?
@@fluoxvonhoovienheimer4706 oppenheimer if he was unemployed
I played this game with my friend and we laughed our heads off when the Dealer decided to shoot itself after checking what kind of round was in the chamber. I really hope they can implement a 2-player mode so that we could play this against friends, it would raise the replay value significantly
Russian Roulette: Safety On
If you look in the steam updates, they're adding a multiplayer mode very soon. Its even advertised on the steam page of the game.
@@rat48785 Yeah it was long before the Steam release when I played this game, I haven't even seen the new stuff that they've added
Good news
@blackcat14077 Is the Dacia Sandero finally coming to the right hand drive market?
Being down to your last “charge”, along with the dealer, and watching him Kurt Cobain himself is such a hilarious, victorious experience.
"Luigi wins by doing absolutely nothing" kinda endgame
That happened in one of my playthroughs.
“Kurt Cobain himself” is crazy
Dealer: "hey guys, I guess that's it"
@@Billytub8003do you remember that level from doom 2 called "nirvana" that spawns you in front of a shotgun
The developer’s gonna watch this and take notes. I know the dealer makes the best possible decisions in every circumstance, but it would be so cool if the Dealer takes into account both his AND your items. And every time you play, yours and his decisions as well as items used from the last games gets saved into the AI’s memory. And so the Dealer is able to 1 up you in the next game in any way he can. Thanks for clarifying your 2nd observation. It didn’t make sense to me.
I believe the dev is infact tweaking the AI.
the goal of game dev is to create an enjoyable and exciting experience. If the dealer acts optimally, the game would be boring, predictable and hard.
So probably not gonna make it too smart.
@@edward3190It would work well with new opponents having different difficulty and behavior
That would ruin the game entirely 🤣
To be fully honest I have no problem dealing with him myself, but this video was still amazingly nice to watch. Very good, high quality and informative. Keep up the good work mate!
Thanks so much, glad you enjoyed it! 👌
Awesome video. I agree, the AI is pretty primitive for the time being, so better cash out that $$$ while there's still time.
Eyy, great job with the game, man! I've been loving it. Glad you enjoyed the vid!
Probably goes without saying that calling the AI dumb is by no means a criticism of the game, honestly makes it more fun to try to game it for high scores 👌
Also lemme know if you want a second pair of eyes on the code or w/e; I'm a software engineer, so reviewing code is like 50% of my job haha.
oh wow hey man
Will you ever Do a mobile port for the game?
@@delightfulkissboy8926I knew it based on your humor alone! Been loving the videos man.
i love the muffled music from the game in the background, its honestly such a banger
I've looked at some of the code myself, and it seems to me he prioritizes items in the order he got them. Naturally, you can't see the specifics of this order in game, because you're getting your own items in that time. But it should become apparent from one turn to the next (I think). EDIT: oops, you talked about that! yay datamining.
I also noticed some weird code that seems to add and remove cigarettes from the item pools based on, I think, the amount the dealer gets? I didn't quite understand what that code did, probably for either fairness or keeping rounds from dragging out too long.
I love the explanation with expected value and building up from the simpler two-shell scenario. Way clearer than trying to simultaneously think about like eight possibilities for the odds.
How do you see the code of games. I'm new to this so I don't know
@@alien3200 You can Google reverse engineering tools for Godot (the engine Buckshot Roulette was made in). It generates a slightly-incomplete project file that you can then open in Godot and get the code from.
The fact that he doesn’t count cards and just checks the last round he puts in so he knows what to do at the end despite that not being the best play kind of characterizes him as being cocky and thinking that he’s pulling one over on you by cheating even though he’s actually stupid, which makes sense for a character that would play a game like this. I love that. It’s characterization and storytelling through game mechanics that you’d have no idea about unless you crack the game open and see how he’s making his decisions. If you can see into his head and know how he thinks, then you get a feel for what kind of person he is, but you’d never know by just playing the game unless you played for a really long time actively trying to figure him out.
Yeah no imo that's a godawful reading trying to tie how it works behind the scenes in the code into actual game characters, the dealer plays fair, and that makes it a way more interesting character than if it was just cocky and trying to subtle cheat, the reason why in the code the dealer knows what the last round is is cus literally any player would be able to deduce that, as the video explains, the fact it knows what the last shell is only comes into play WHEN the last shell in the round is being played, so it's fair to assume that it knows that through simple deduction skills, if there were 4 lives and 3 blanks you'd know what's the last round if 3 lives and 3 blanks were shot
@@azurabbit12 you’d also know what rounds are in the gun if there’s only two live rounds left, but the dealer doesn’t. Sometimes he’ll still choose himself even when there’s only live rounds and sometimes he’ll choose you even when there’s only blanks. You can tell he’s not using intuition to deduce the rounds remaining in the gun because there are times when he would have information if he were using deduction, but by his actions you can tell that he doesn’t have that information, so he must not be using deduction. He cheats, checking the last round to know what it is without realizing there’s an easier way to get more information. This demonstrates that he’s a bit of an idiot, and he never realizes his mistake even after seeing you absolutely thrash him, so there’s probably a bit of ego in the way of him realizing his mistake.
@@talongreenlee7704no, the person you replied to is right. The reason the dealer can make a mistake when there's 2 live rounds was simply because the person who made the game didn't want the dealer to "count cards" during the game and simply only know the last round for balance reasons. In the same way anyone could figure out what the last 2 shells are, people make mistakes, and can misremember the ratio or number of shells total. It makes sense that the dealer doesn't have a perfect memory because humans don't either. Equating fair or even lazy game design as cannon lore doesn't make sense to me, if it was a higher budget game or something I might expect them to put more thought into how ai patterns affect lore.
I like how rule number 2 happens before rule number 3, and rule 1 happens before either (the dealer will use a magnifying glass and then a beer despite rule 3 saying he can just shoot himself- he has more items to use dammit)
“rule number 2 happens before rule number 3”
Aint that just basic counting
@@endieisfridgeconfirmed The point is that they don't happen in a sequence per item, they always take priority even though logically using a magnifying glass should dictate the rest of the turn order once used
Imagine fairness update, where Mike Klubnika actually implements all the smart plays, like counting the bullets
For such a simple game, you would expect this to be the case.
I think its actually good that the dealer is a little bit stupid. If the dealer played optimally and the player plays optimally, then the entire game just becomes pure chance. If the player is playing sub-optimally, which is the case probably 90% of the time, then the dealer has a big advantage.
If the dealer is a little dumb, then it gives more room for the player to play smart and increase their odds of winning. You want player choices to matter, that's the whole point of a game.
@@jasonslade6259 The problem is that the game is not that complex to begin with. Rounds with a lot of cartridges and items could be much more fun if the opponent tried to appear slightly more intelligent. The current version of the game is heavily skewed towards the player, and that affects replayability a lot.
In the newest version of the game in the Double or Nothing, the dealer does count how many bullets are left (i.e. 8 shells, 4 live, 4 blank, 2 lives have already been fired, the dealer will choose to shoot self because it's a greater chance the shell is a blank)
I've never even played the game, just watched youtubers play it, and I still find this super interesting.
The fact that the dealer would do the 50/50 even if the bullet type is easy to figure out but either not the last or mg’d makes me wonder if there will ever be a version of the ai made that does count the bullets and makes decisions on that basis
That would be easy to implement too.
1) Count all blank and real shells in the beginning.
2) Substract each type of shell when used accordingly.
3) Instead of doing 50/50 random roll, do the roll according to blank/real ratio to do a specific algorithm (yourself/opponent).
I am kind of surprised they didn't implement it.
@@DeonGamingtechnically, in code it wouldn't be that. It just needs to track live rounds and remaining rounds, and then, pick a random integer between 0 and remaining rounds, inclusive. If the random is less than live round, shoot enemy, else shoot self
@@furiouscorgi6614we found the coder in the room
This was an indie game (i think) so the developer might add in future
Hoping this blows up, this is unique, informative, high quality stuff right here
Thanks, really appreciate that! Glad you got something out of it 👌
I'd be interested to see a mod where the dealer actually uses minimax (or expectiminimax, as the case would be here). Though I imagine that his behavior here is better for average game balance.
it'll become unplayable
@@dan_2247 nah, since you always go first, you still have a major advantage even against an AI who is making optimal choices I bet
@@blueyoshi4211better the a.i always go kurt kobain
Have you played chess against AI? Yeah, that'd happen. Chess AI is fucking scary for no reason.
@@rick30521 Chess against an AI is impossible because chess is not a game of chance. Faced with both random items and a hidden random shell order, the AI is just going to do the best with what it's got, which may not be much.
this might just be the highest OK-per-minute I've ever heard
😂 It might just be
Thank you for this! This is a wonderful look into how it works, and you present it in an entertaining and easy to follow way. Part of me is interested in seeing a mode where the dealer actually keeps odds in mind (being able to use the same logical deduction we have, like in the 1 live/2 dud, seeing a dud go off, and knowing that there's a 1/2 chance) - but I understand there's a difference between realistic AI and an AI that's actually fun to play against, and I'm not sure where a more realistic AI logic would fall.
Really appreciate it! And yeah, I was thinking a similar thing. Was gonna try and write a bot to play the game in a smart way using monte carlo simulation, so maybe I'll actually follow through with that but try and plug it into the dealer AI instead lol.
@@delightfulkissboy8926i have a full decomp of the code that can be recompiled from source if you want to use it to make your mod!
@@delightfulkissboy8926 Interesting! I hope that goes well, I'd love to see how it goes.
@@uncreativecultistOh nice, that would be sick actually, is it uploaded somewhere?
This mans 'Okay' storage in never out of stock
😂 Fitting that the person I thanked is named "Ok_table"
Commenting from the future to note that I'm pretty sure in the Steam version's Double Or Nothing, Dealer actually keeps count of the shells in the gun. If there are more live shells than blanks left, he always shoots you. If there are more blanks, he always shoots himself (or inverts and then shoots you). And I think if there's an equal number of live and blank, he does a coin flip.
That's just me guessing based on my observation, so I could be wrong though!
that's why the rule number one of double or nothing mode is if you can, do not give the dealer any turn at all
I don’t ever plan on playing this game, however I have been a ton of strategy videos. It’s more fun to watch knowing what’s happening.
Never played this game, got no idea why TH-cam recommended this video...
Absolutely fascinating, great video.
Thanks for the online lesson, teacher!
You honestly have a really nice "no bullshit" charm to how you explain things in this video, so I might actually check out your channel!
11:01 “now heres the thing; that’s stupid actually. (sorry.)”
had me cracking up, new sub 🙂
edit: also this is a great video on a nice topic, i look forward to seeing what else you create
I still love how Dealer can check bullet and still shot himself with life round
He was like alright I lost
Dealer be like
😁🔍 Hmm interesting...
😁💥🔫
What being a dealer does to a mf
why is this so accurate😭
The Dealer is just depressed.
The powerpoint presentation hooked me in, no lie
Who doesn't love a good slide deck lol
I'd love to see a new writeup for the updated versions, including the Double Or Nothing mode where the dealer can use the burner phone item to gain information on a random upcoming shell. As well as the general AI changes, like him being able to count the rounds.
This keeps coming up in my recommended lol. I have never played this game, I don’t know what’s happening. Coming from a CS background though, I love the code analysis.
Yeah haha, kind of have a split audience between BG3 and this game rn. But same! I'm actually a software engineer, cool that you're in the same field 👌
If I were to write a smarter AI pattern, it would go something like this:
1. If any health is missing, use cigarettes.
2. If there are at least 2 shells remaining, use magnifying glass.
3. If current shell is determined to be live, use handsaw.
4. If at least one other live round is remaining, use handcuffs.
5. If the current round is determined to be live, fire at opponent.
6. If the current round is determined to be blank, fire at self.
7. If the current round is undetermined but the ratio of remaining blanks to live rounds is 50% or greater, and there is more than one shell remaining, use beer.
8. If the current shell is still undetermined, choose randomly to fire at opponent/self based on current ratio of remaining live/blank shells.
Maybe not the most optimal AI, but probably still harder to beat than the current one.
yeah, that AI would probably be REALLY difficult to play against. I'd imagine that to be a "Hard Mode" game play wise. And then in the "Very Hard Mode" the dealer will know what the last shell in the tube is, and plan his game around that as well.
@@Kalmaro4152that AI covers for a last-round situation, since the last round will either be 1:0 or 0:1 ratio and its guaranteed to play properly with it
This is the best expository essay I have seen made for a youtube video so far.
This video sounds SO close to Kronk speaking and I keep hearing glimpses of it every now and then when his voice gets deeper.
I've always found it interesting that since the dealer knows the last round every time it implies they are counting the rounds, but do a coin flip to give you chance to win. Like with casinos stopping at 17 for black jack
It’s not designed for best advantage, it’s designed to make sure the player looses. This is to allow the game to be playable.
Right, I think the game is actually better with the existing AI, minus maybe a couple unintended behaviors.
Adding realistic AI would make the game not fun
Good to see someone cover this. The AI isn't terrible, just terrible in certain areas. You can game it, and that makes it more fun if anything.
I remember two weeks ago people were specifically calling this dealer AI "smart", and now that the behavior is cracked it instantly becomes dumb. How funny things turn out in very short periods of time.
Yeah
ManlyBadassHero won his first playthroughwith the Dealer commiting scooter ankle, despite the only possible shell being live.
The Dealer bumping himself off after smoking 2 cigs and downing 3 beers, each one skipping a blank, with only 1 shell left, Manly went from "oh, this is gonna hurt" to "guess not".
Then he did something similar in the third video and Manly cracked up.
For the example at 12:00, it helped me when I wrote it out to find that the Self shoot had an expected value of 1/3 to give -1 and a 2/3 to give 0. The second turn, assuming the worst doesn't happen, is always 50/50. This means that shooting yourself on a 1Live 2Blank isn't going to help you get an advantage; it will just be a risky chance to break even. On the flipside, it's bad for the Dealer if you choose to shoot him, with even the worst case scenario having you break even. The step between the shells available and the final expected value made understanding your explanation confusing until I got this.
ive never heard a man blessed with a voice this close to patrick warburton
😂 So far on this channel, I've gotten a 50/50 split of people saying I sound like Moist Cr1tikal or Patrick Warburton lol
@delightfulkissboy8926 I definitely heard Moist first, but the Patrick definitely grew on me the more I listened
this is when i can’t wait until online play is possibly a thing. playing this game against other people would make it 10x more fun
Dagoth Ur really knows his stuff.
Good video, made me want to mod the game and fix the bug + make the dealer smarter ^^ Did a stream of it yesterday, but managed to mess up the calculations a little bit so gotta try again today.
That's sick man, will check out the stream after work tonight 👌
@@delightfulkissboy8926 Uploaded a slightly shorter video of it! Might try to make a bot play the game for me at some point, was a fun mini-challenge.
It would be really interesting for PVP to be added to this.
There is a proper order to use the items. Starting cigs. If you have less than max health, use one. Next with the beer. Use in only two scenarios. If there is only one live round left regardless of number of blanks, or if all remaining rounds are live unless it's the last bullet or handcuffs are in play. Then comes the magnifying glass. Now comes the handcuffs, if the current round is live and the next is unknown or live, use them. Finally, comes the saw. If the current round is known to be live, use it. Now, if it's live, fire at the dealer, if a blank, fire at self, and if unknown, fire at the dealer.
I made Russian roulette ai before. I thought I was giving it too much knowledge when it know how many real shells are left
you sound like the guy from The Emperor's New Groove and I like that
i was going through the comments looking for this comment lol
You seem like the kind of guy who would like Phasmophobia. Learning the different AI behaviors is key in that game
Been meaning to check that game out! Some of my friends were into it for a while, but I missed the bandwagon. Maybe I should check it out anyway
I have seen him use a magnifier, saw the shotgun, beer out a live round, point it at himself and get hit by a live round. Clearly it must have been a bug because it made no damn sense.
The dealer drinking beer to eject a blank shell could be representing addiction. Kind of like how he’ll still use cigarettes after the defibrillator wires have been cut.
Not now mom, I'm listening to Joe Swanson break down the decision tree ai in an indie game
I beat the game first try, but I want to learn how the dealer works. I really like learning how things work.
i blame you for the new dealer AI being more difficult, they listened to what you said and fixed it 😭😭😭😭😭
Dealer just likes to booze it up and have a smoke! He doesnt have to worry about getting less than 70k at the end, so its all free to him.
Is this video up to date? The AI seems a lot more advanced now. His item usage is consice, especially now that there are addictional items than what's mentioned in the video. He also seems to be playing the odds to his advantage very consistently.
DoubleOrNothing AI works slightly better
It would be cool to watch you play a round of the game with this in mind and show how this info could be utilized!
i played 13 games, dealer has never shot himself, his luck is ungodly.
what killing god does to a mf
17 games and hes still played perfectly every game
@@Water-rg7gp bro got the Skynet mod 💀
u mean he never shot himself with a alive round?
@@The_Dr_Fate correcting me literally does nothing
Didn't expect moist cr1tikal to be talking
I think that they should allow the dealer to count the shells as well, like players do. It'd make him do more informed decisions. And the chances will always be in the player's favour because the player always has the first turn. But giving him the ability to count and perhaps to use items more optimally would even the playing field more between player and dealer. Because, if you play optimally, unless RNG screws you over, you will win almost every time. It would make the game more intense.
rewatching cause i really enjoy your analytical explanations of things like yhis
I saw him use a magnifying glass and then immediately pop a can of beer to eject a live shell lmao, so that random order rule REALLY screws him over big time
i would have never expected "Delightful Kissboy" to be the one to explain a games AI to me. truly an enlightening experience.
The fact that he uses the items in the order that he got them and as soon as possible explains why the dealer sometimes handcuffs the player only to do the 50/50 coin flip on himself.
Personally i have seen him check the shell with a magnifying glass, see that it’s a live shot, then shoot himself and i won the game. There must be some kind of bug where he “forgets” what shell there is
I once saw him using the magnifying glass and shooting himself... With a live round.
he was simply asserting dominance
Heads up:
The AI works slightly differently in DoubleOrNothing mode in the full game. He counts the shells remaining in the gun and aims according to how many shells of each types there are left.
i was assuming that the double or nothing mode fixed these issues in a way
With the release of the Steam version of the game, playing the Double Or Nothing gamemode, there is something that I've encountered. For 4 shells in a row, without using a single item, he knew exactly what they were. He Managed to "shoot" himself with 3 blanks in a row, and then pointed the shotgun at me and shot me with a live round. The kicker? It wasn't the last round that he shot me with, it was the 5th round out of 7. So, either I'm just stupid unlucky or I encountered a glitch of some sort
With the steam version the dealer almost always know what the last one is
@@anarchistmaverick9507 Yeah, that wouldn't be an issue if he didn't rack the shotgun 4 times in a row, ejecting all 4 blank shells from the tube
@@gamingnerd0348he knows that last one is live, so he ejects everything else, he's actually crooked now
Thank you, Brock Sampson for your insightful video!
From what I understand, what makes him exploitable is how he does coin flips for every turn outside of magnifying glasses or the last shell, meaning he has no concept of what the odds are. So for example, let's say you know that there are 4 lives and 4 blanks. 2 blanks were used, there are now 4 lives and 2 blanks. It is highly likely that the next shot is a live one. But the Dealer still sees this as a 50/50 coin flip in his case, so despite it being of higher value to take the chance to shoot you, there's still a chance he'll waste a life of his own anyways. So if you want to win, just keep playing into the odds. Even if the odds weren't in your favor in this scenario and you took a hit, he still is more likely to shoot himself when there are still more lives than blanks.
Me playing Buckshot Roulette: "Man, this dealer is so clever. He keeps predicting what's in the chamber!"
The dealer in question:
"who gives a fuck about this shit unless it helps you win more?" Hits hard and I don't know why
Howdy. Great video, big tip if you ever make a similar kind of Game Theory video, it will help immensely to utilize payoff matrices. That way the viewer can easily read the strategy to payoff values as your talking them out. Instead of just the “Expected value is X”
If i remember correctly, I watched Joe Bartolozzi play Buckshot roulette, The Dealer had used almost all of his items and joe was already saying that he lost the whole thing. But when the dealer KNEW what the shell was (Because he used the magnifying glass). He used a Saw, Smoked, And handcuffed Joe. And which the Dealer Stupidly pushed the "Cancel Subscription" button on Life. Joe, And everyone was shocked. (Note: This is from memory which means this probably isn't true :/)
This dude once just casually shoot 3 blanks at himself in a row without knowing and checking those bullets and then shot me. I was kinda freaked out
1. dealer uses items as soon as possible usually, unless it does nothing like healing at full health or using magnifying glass twice
2. dealer uses item in mostly random order
3. after using magnifying glass the dealer will act accordingly like blank + shooting himself
4. if dealer doesnt know next shot no matter what he will flip a coin to see, head shoot you tails shot himself
5. dealer always knows the last shell
6. dealer only knows next bullet when its the last shell or when using magnifying glass
Thank you good sir for telling me the CRUCIAL info about the adorable dealer form buckshot roulette. 🤓👆
the patch notes on steam said that double or nothing mode has a better dealer ai.
As someone who doesn’t play buckshot I will use this information in real life.
i don't even know what buckshot roulette is and I watched the whole video. I found it very entertaining.
I recently bought the game, and had an interesting moment in final round. Me and Dealer was on last hp. In the chamber left 3 shells and 2 blanks. I used handcuffs on him and tried to shoot him. Twice. Both of them was blank. And when Dealer began its turn, I thought: "That's it, I'm dead", but suddenly he drank beer, and then shooted himself. I was both disappointed and happy, that I won. It was my first playthrough tho.
I feel like even just a couple lines of code could make the AI much smarter, and I really do mean a few lines. Instead of 50/50 on unknown shells, the dealer could just use probability. Like we know how many shells are left and what is left, but not whats next (usually). You wouldn't even need to actually calculate the real probabilities. Assuming that there is 2 blank shells and 1 live shell in the tube, and its the dealers turn, the code in LUA could look like;
Blank = 2
Live = 1
if Blank > Live then
shootSelf()
elseif Blank < Live then
shootPlayer()
if Blank == Live then
flipCoin()
end
In the example, since there are more blanks, the dealer would shoot itself. Now obviously you could go into more detail, have the AI actually calculate real probability, maybe even take into account what the last shell was as well.
Great video! Thanks for the information saw your post on reddit. You earned a subscription.
I noticed in your high score video you said that the cigarettes lose you points, do you think you could make a video going in depth about what makes you losing points and what makes you gain points?
I think that would make for a great video!
Good idea! Might have to do that, was gonna take a crack at decompiling the game this weekend and I'm curious as well
the script is named 'DealerIntelligence' lol.
I suppose the perfect the dealer would need to evaluate a tree of possible future gamestates...
maybe a genetic algorithm could produce something that can look at it's opponents items and it's own and use this information in an impactful way.
I think the game is simple enough you could get some pretty good results with a monte carlo simulation. Even a heuristic to just always shoot the player would make him way more lethal lol. But I'm not sure improving the AI would even improve the game, would be way harder to make it through rounds.
I'm guessing him knowing the last shell is supposed to be representative of him keeping perfect count. But as someone who's worked as a programmer, I'd just tell him what's at the end of the array rather than write a whole damn counting routine.
Yeah, especially since none of that counting is used anywhere in his ai. You dont just go make a whole logic when you can replace it with a simple hardcoded behaviour that is always appropriate for what you need anyway.
Holy smokes Kronk ! Did not expect you to create a new youtube channel after all those years !
Here 20 minutes after you posted. New sub
Thanks, appreciate it! 🙏
Honestly, even if the creator improves the AI, adds more items, more variation to the gameplay, I still wouldn't want it to be perfect or human-like. With games like these, part of the fun is to find exploits in the AI and "Conquer" it. The only thing that could be better is "Other modes" or "Other dealers", as in, versions of the dealer that have a different AI to figure out, like a puzzle.
The dealer: you smoking that shit again man
you inspired me to write a little program that tracks the number of l/b rounds.
"Who gives a fuck about how this shit works unless it lets you win more?"
Me, not owning the game and enjoying the math and programming: ....
love the rave music in the background, feels like we're both hanging out in the nightclub below discussing strategy
as a notice gamedev I find it really interesting that this simplistic AI is actually the best choice for this game given it makes the game more possible than if the AI played 100% "optimally"
because thats where pvp comes next