Rigged Card Sorting Machine - ALWAYS Get The Hand You Want!
Вставка
- Опубліковано 7 лип 2024
- Raspberry Pi Powered 3D Printed shuffler - reads each playing card and organizes them so when the hands are dealt out, you get exactly what you want. Or if you don't feel like cheating, you can tell it to do a near true random card shuffle. All shuffle commands are sent via a web interface with plenty of knobs to turn for maximum control.
Join my discord for behind the scene project updates! / discord
Thanks for watching! If you want to see more videos like this, please like and subscribe to show your support. If you would be interested in a patreon page for exclusive content and privileges, please let me know in the comments below.
Github Project Page: github.com/DDeGonge/Shuffle-o...
Music: www.bensound.com
Chapters
0:00 - Intro
2:35 - How It Works
3:30 - Mechanics and Operation
6:08 - Software
7:08 - OpenCV
8:43 - Standard Shuffle Demo
9:54 - Blackjack Demo
11:11 - Hold'em Demo
12:47 - Outro
#3dprintedlife #shuffler #opencv - Наука та технологія
Your UA-cam channel is very underrated. Glad I stumbled upon it today!
Thank you!
Agreed!
i was gonna write the same lol
Same
Same feeling
This can also be used to put the cards back into the box in the correct order when you are done playing!
Why would you want to do that though?
@@Fadexpl why would you not?
@@player-8740 because there's literally no reason to do it. It would take more time to get rid of the pattern while shuffling the next time you want to play, and you need to shuffle them anyway.
@@Fadexpl I like my cards at least suited at the beginning for a quick check if all are there.
@@therealpanse you can just count them
Great video. Now really convinced me that casinos is stealing my money right my very eyes with the "shuffles".
Not sure if all but indeed there are models that have an optic sensor.
Exactly! Rigged games...
@@mattiasw.5846 When do you cut the deck? ua-cam.com/video/oZn7ZML4nmY/v-deo.html
It might raise some suspicions when it takes 5 minutes to "shuffle" the deck. Really cool project though.
Haha yes, probably. But that's ok with me, the "cheating" part was mostly just for fun to see if I could, I never plan on actually using it. In fact, I was going to add a red LED that illuminated whenever it was running a cheat routine to make sure it's very obvious, but that didn't make it in the final prototype.
What ya do is have 2 decks worth, a play deck, and a shuffling deck. While one is getting played, the other is being shuffled, and then at the end of a hand, they get swapped.
@@MinorLG I would get too distracted during the game though.
@@billmight5662 It doesn't have to be on the table to distract or maybe noise could be reduced. Also maybe with a smooth shell casing on the outside and noise reduction it would become viable? Definitely a cool product though :)
Back in 6th form when ever we played cards we had 2 decks and what would happen is while the game is going on the dealer would shuffle the cards for the next go. We also had it where the dealer must make everyone a stack of cards in front of them and people would grab a stack to prevent the dealer from dodgy deals and the dealer would have to wait until the other stacks where collected before collecting theirs.
The amount of system integration work that you're able to make work reliably is amazing. Amazing work.
Thanks! I'm actually a system integration engineer professionally, so I really would have no excuse if I failed haha!
it's so nice when the youtube algorithm coughs up something I'm interested in watching. Apparently herring bone gears can be quieter.
“I’ll see yah in a few more years” 😂😂 gosh I hope not. Amazing video Andrew! This channel is one of my favorites and I can’t wait to see what you do next!
Maybe only 6-12 months...we'll see! But first I need to come up with my next project idea...
Add a "sort" mode as well, for people that wanna get an organized deck on demand. :)
Dude you need to keep it up. This was amazing. I just watched the whole thing without blinking.
Let me know if you need some eyedrops. And thanks, I have been keeping it up! My newer videos have way better production quality, though I will admit some of them were better ideas in my head than in practice XD
If you enjoyed this project, please check out some of my other videos and consider subscribing. I'm releasing new project videos every month! ua-cam.com/users/3DprintedLife
Silicone lubricant man, should help a fair bit with the noise in the gears.
I would say white lithium grease. They aren’t sealed so oil would quickly run off.
I recommend vaseline,
I use it on my wife too, stops her from screechin
one of the most important things done with real gears is to use helical gears instead of spur gears. Spur gears are more efficient, but all auto transmissions and tons of machinery use helical gears, just to help reduce noise.
@@Timestamp_Guy those aren't smooth it might cause internal damage
@@OooohReally Not for anything directly touching the cards (you wouldn't want to grease anything that touches the cards either). Just for the drive gears (not the toothed pulleys for the belts either)
Nice that it can start from an unordered deck with card recognition; quite a project!
In some competitions (bridge, for instance) all tables need to play the exact same hands. They use devices to create a series of identical decks.
But building your own is of couse way more satisfying, and a nice project indeed!
Nice to see you back. Hope you are doing well.
Good to see you back. This is honestly a pretty cool and involved project.
Thanks!
Brilliant work! Congrats on nailing it!
Well shot, well edited, well narrated, straight to the point with enough information it's interesting but not too much that it gets boring or confusing. Oh, also a great idea that was executed well
Amazing work, instantly subscribed at the end of the video!
Thank you!
Just discovered this channel now through the video. Impressive. Liked and subscribed.
Thanks!
Welcome back! You should update the software to inform you if any cards are missing.
Yeah great idea! I really need to speed up the card recognition first though, it's too slow to run during a regular shuffle as is
Or duplicates
I love these kinds of projects and videos. Keep it up, subbed!
Thanks for the sub! I've gotten such good feedback on this video that I've already began 3 new projects, so more content will be coming soon!
This is super cool project! Nicely done
Thank you! Cheers!
This is a great project and video! Glad I found this channel. You could maybe add a physical button on the device itself to do the regular random shuffle so that mode can be used without having to open up a browser (if that's the most common use I mean haha)
Plan for V2 is to add a touchscreen UI!
Evil! Subbed.
Two ideas. First for the feeder, have a look at how printers run their rollers. They almost invariably have three: pick, feed, and separation. On cheaper machines the sep roller is just a pad. Anyways ideally the pick roller (the one that sits on the stack of paper) rotates along with the feed roller, and the sep roller is either stationary or even turning slightly backwards. That's what prevents double feeds. The pick and feed rollers are usually on sprag clutches so they can freewheel. After those three, you'll have two driven pinch rollers that actually deliver the paper.
Second...there should be an even more evil and harder to detect algo in the evil shuffler: make player x really lucky. Don't specify any one hand, just make sure that x always has a better hand than everyone else. Maybe they'd even occasionally lose a hand just so nobody gets suspicious.
And of course, there is in fact a method to prevent just this kind of deck ordering shenanigans:
The Cut.
True, but there actually are some deck configurations in which, even after a random cut, you will still always win. The stack depends on number of people playing and you can't decide exactly what you get, but still an interesting concept!
@@3DprintedLife Is there a specific example of this?
@@opfromthestart3645 go to jail for a few months... 3 max
thats all it took me to learn every fun card "mechanic" "*MAGIC*" trick for only entertainment purposes
Damn, I didn't even realize I was subbed to you, bought a 3up kit wayyyy back when. Cool project!
Awesome, man it's been a long time since the 3uP days. Well thanks for the continued support!
Nice project!
What fun you had creating this!
Here's something you might like to add....
a "Pack Sorted by suit" with choices of how you want the pack sorted... Ace-King (or reverse?) but so you can pick Spades/Diamonds/Clubs/Hearts or any combination of the suits?
Yeah a few people on reddit suggested that. This is actually a feature that commercial casino shufflers have. They share a similar card recognition system, though it is locked to be exclusively used for the deck re-ordering feature to prevent sketchy casinos from abusing it like I can do with mine :)
OK now I can get into agriculture! :D Amazing work, bud!
Thank you, a lot, for showing and explaining this. Very useful. And amazing great work you did, well done!
Love the content Andrew! I vote you make a video showing off your process for building super simple 1-pager GUIs for python with HTML and PMP.
Why thank you David!
Hello stranger! Glad to see you’re still with us!
Haha yes I am! Will likely stick to fewer but higher quality videos from here out, so it really may be 6 months until my next one :D
This absolutely is what shufflemaster patent shows. Great video and great work showing us. This is definetly what the casinos do. I miss the good old hand shufflers now they say most states banned hand shufflers. No its banned bc they want more $$
Hoping to see v2 of this soon!
underrated channel !
Appreciate that! :D
that's a really cool shuffler.
i have one of those cheap noisy ones. lol i barley used it.
i was tying to make a card distributor or electric dealer 12 years ago and instead made a device that throws an entire deck around the room in a matter of a few seconds.
it was too fun to fix.
This is seriously so awesome
I appreciate your oxford comma.
great job ! you are quite a inventor! I am thinking of making a simpler version - the one that will just shuffle cards randomly into 4 stacks; no need to recognize cards etc.
This is pretty fantastic. It would be fun for, say, having two identically shuffled decks and see who does better at Klondike.
Bro, did you consider tagging your video under the section of 'horror' ..This is the stuff that fuels nightmares. These casino machines will flat out put people in the streets.
Great project. And the reason that most state gaming regulations required all cards to hand cut is to disable any chance that an ASM can be hacked and used to cheat.
Wow! Genius! Subbed.
Nice recreation of what we did in the mid 70's (OCR and handler not cards but the concept is the same)
Personally I believe the rotary storage is a better method, but that is my opinion
When you see the shuffle master sort the cards the first time this should tell you they have full control
Hi, great vid. Just had an idea for the dispenser to make it more reliable. Where you have the pair of rollers spitting the cards out, the top one could briefly rotate in the opposite direction, so if there is a second card on top it gets put back in the deck while the bottom one continues but if there is just one card it will get sucked slightly in then spat back out again. Alternate idea, put the roller on a moving arm that goes on top of the deck so it only pushes the topmost card out at a time, if you springload the arm so the downwards force (and move the tray up a bit for each card dispensed) is minimal the top card wont have enough friction with the one under it to drag it along. Have the arm mechanized to move out of the way (idk with a servo or something) so when the shuffled cards are being inserted it can get out of the way.
Great suggestions! I actually considered something similar to that first concept for V2, but got sidetracked by other projects. But I may end up doing just this once I get back to it!
Sidenote, that paper feeder will be of use with some OS Plotter/inkjet printer development !
I can’t imagine the time and effort. Wow!
Cool stuff.
Me: I wonder if I could make a card shuffler that stacks the deck...
UA-cam: Here you go
very impressive!
Amazing invention ...First time to your channel...You mastered 3D printing, engineering, and coding to create this machine...Bravo.... Imagine what the big casinos are investing in, to gain advantage over players... Do the Shufflemaster one or two models have software/cameras to detect suits in pokers games??? I've been playing for years and been witnessing some extremely suspect hands by dealers..
feels good to be a new memver
Man, the casino stuff I learned!
This: is in my recommended
Me: is not disappointed in the algorithm
Love the video! But there is a cut by the dealer once it's done. There are even ways to set up the deck where cutting it anywhere will still result in a rigged result.
Amazing!
Amazing! take a look at the paper pickup mechanism on consumer printers, it might give you some inspiration on how to improve the card dispenser
Great tip, thanks!
@@3DprintedLife Biggest difference between what a printer does and yours is the orientation. Printers don't try to take the bottom sheet of paper, they take the top one. The paper sits on top of a spring-loaded tensioner that holds the stack of paper at a constant pressure against the rollers.
Also, their rollers are always a flat profile, not the round one you get from the o-rings. I suspect it gives move grip for less tension, so there's a lot more friction between roller and paper than the paper and the next sheet downwards.
Make an algorithm that makes the interface more simple. Like: which player will win and then it just makes a random situation in which that player will win. Also, you could add a little slide thingy to the end which can rotate. This then automatically distributes the cards to the different players / to the middle.
You could add so many cool features in the code.
Really neat ideas, I may try those in V2! I've also been interested in calculating certain ways of stacking the deck such that no matter where it is cut, you can still always (or with high probability) select who should win the hand. I know some combos exist but I would love to write my own algorithm to identify all the options for different numbers of players and who's dealing, etc!
I want this. Actually what really got me looking was less poker, as its easy to shuffle for poker with some practice, but there are so many board and card games with even larger decks and cards that I want to sleeve, that decks become difficult to shuffle, and it would be great to have something with a bigger hopper that could shuffle up large decks while the rest of a game is being setup.
This could be modified for "tele-IRL card playing" i bet (pun?).
Kind of like what @Stuff Made Here did for the automatic pool stick?
Haha yeah that's a neat idea!
amazing!
This is really cool! Why does it only have 1.3k views? :(
Hmm, must not have been blessed by the UA-cam gods. I knew I should have sacrificed that goat....
You spend two years working on this to finally beat your friends at poker. Then the dealer takes the cards from the machine and cuts them.
_sulks away slowly_ guess I need to make some improvements for V2...
You're a genius...
I'm late to this party, but I think the mechanics can be simplified quite a bit. The movement of the dispenser could replace the movement of the slots module - The slots module doesn't have to move at all and the ejection bar for the slots module can unload all of the slots at once if the dispenser is at the very bottom. This would make the sorting mechanism quicker and would allow you to fit more slots in.
If the dispenser was double sided you could have slots on both sides as well, allowing even more slots within a compact space.
Nah the party never ends. I eventually want to build a V2 but I have a few other large projects to finish up first. I appreciate all the feedback though, definitely some things to consider!
How does this channel only have 24k subscribers???
You know, when I was a kid, I made a card shuffler (which worked quite well) out of legos. the wheels are perfect for dispensing cards
How about the shuffle machine Texas Holdem when playing against other players?
Can’t wait to see the Uno version
Must cover up wires and
How
Its
Built
(Nvm UNO!)
Super Cool! Most of the issues you were having with the cards, the biggest one being able to get a single card, I would have to say were the cards. Bicycle cards are great cards, but if you were to use them at a NLTH tournament, they would last about 10 hands max. If you had some plastic poker cards, the Copag Poker Jumbo are great around $10/pack, the cards would become a constant, not a variable. They would always be, and only be, as slick as when you begin, unlike the Bicycle which would start one way and continuously change with use. I really want one, but dont think Im at this level yet.
When regular shuffling it mixes it twice, the cheat ine only does it once, but what if it shuffles it in a specific order the first time so it knows where each card is and it will be faster separating all of it
amazing
I never clicked on a video so fast
You should try using dielectric grease for the noise. It should help out a bit
Impressive
I feel like the image recognition part can be done a lot faster with a tiny AI model that can run on raspberrypis.
you could greatly decrease deck restoration time by pushing the bottom 4 then the top 4
Hey I’ve never built a robot before, I only just bought a 3D printer last year, and I have minimal experience coding. I think I’m going to try designing my own version of your shuffler :)
Just FYI....most companies that create shufflers don't sell their products not because of hacking but rather their model of business is based on leasing their products to casinos. They would much rather keep getting a monthly paycheck from the casino in using their machines than a one-off payment (not enough casinos open up each week for them to profit off of). The lease has stipulations that the casino has to adhere to or lose possible millions in lawsuits, this allows the shuffle companies to control all aspects of their units.
You don't get access because you are not a casino....and contracts are usually set in years and numbers (such as 5 machines at $25,000 per month for 1 year, as an example). There is no "hacking" because unloading data requires a password authentication and a hardware key, otherwise you are physically hacking which can easily be caught by casino managers and surveillance. The software has several modes based on the number of games the casino provides, allowing a machine to be swapped from table to table as needed.....and it also has a sorting and recall function. Despite what conspiracies are out there, no, the machines do not have a "set hand" function as not only would that violate commission rules, but also leaves a vulnerability for casino losses by the shuffle company (which leaves them liable on those losses because the code is theirs by lease). Yes, the machine can sort and recall, but that's just reading, not setting.
Just a little FYI
wow this is so cool, I'm not good at poker but now I can be!
Exactly! It isn't "cheating" if it's cool! :D
OCD can be emulated by comparing all master images with the scanned one and take the one with the highest % score. It's not how OCD works, but it's a lot faster.
This is a very impressive machine that goes well beyond the scope of anything I desire from a shuffler.
However I hope you can push me in the right direction, I'm playing a board game called Talisman which has several decks containing hundreds of cards, with the main "Adventure Deck" being over 600 cards with all the expansions and is a tedious pain to set up.
I'm looking for a shuffler that can shuffle US Mini sized cards and won't destroy them either. I've seen some of the demos of the cheap mass produced shufflers and they look like they'd wreck these cards. Manual hand cranked versions seem more viable but they would still take too long and don't seem to provide a good shuffle judging from some videos I've seen.
Apologies if this was impertinent to ask but I'm at my wits end trying to find something good that won't break the bank and your video came up in the results.
Cheap shufflers will definitely destroy your cards, and I highly doubt any quality off the shelf solution exists for mini cards like that. You could definitely do something similar to my design, but keep in mind two things. 1. This design is pretty dependent on how much force is applied to the card being fed. So if you have too much force, you will feed 2 cards. And not enough you may not feed any. And somewhat related number 2. this feeding mechanism will only work with low friction cards, like bicycle playing cards.
If you want to build your own solution to this, you would almost definitely want to flip the feed mechanism, so you can much more reliably control the force applied via a spring loaded mechanism, and this allows for some better feeding geometries which can be a little more resistant to minor damage at the edge of cards.
Be warned, if you do want to build a project like this yourself, it is going to be a huge time sink, especially if you want to make it reliable. Good luck!
I need this 😂
i had a friend who had a cheapo shuffler. you split the deck in 2 parts and it would shove the cards randomly from each pile in the center, do it a few times and it would be shuffled
crazy. it's a bit slow, but still cool!
the dispenser would colloquially be called a " shoe "
in theory , you could have a realistic 1 , 2 , 3 deck-shoe game of blackjack - which was invented to stop card counting , the more decks in the shoe, the harder they are to count
You should add a unshuffle option to put it back into the order of a new deck!
awesome wow
Due to strong interest in this project (and wanting to recreate it) I did some research calculations. I found that with 8 bins the chance of the bottom card ending on top is about 790x larger than the top card ending on top. This quickly decreases to 2.3 times after 2 shuffles and to 1.1 (neglectable) after 3 shuffles. I thought these results might be interesting ; )
I hope it's OK to use this concept for inspiration for a future design project of mine.
Really interesting, thanks for sharing. And definitely it's ok to base a future design off of this. That's what open source is all about!
5:40 Making a "code explanation video for NERDS" video or something similar for projects may allow for moar youtube treadmill/algorhythm feeding, as well as helping others learn how to do the "behind the scenes"
(granted may be other sources to learn obviously, but moar videos/content = moar win?)
(also would require NLVE-ing time which is ...eh (at least for me) so may not be worth it in your opinion, just throwing this idea out there)
Great design and explanation. I'm wondering if you could estimate build cost (assuming access to a 3d printer, say), and say anything about "maintenance" of the machine given regular use (eg do you need to recalibrate the camera, launcher etc regularly)? Sorry if these questions were answered in the video and I missed them.
Total cost is somewhere around $200-300 and there's no regular maintenance, but the card dispensing mechanism is unfortunately pretty unreliable so most of the work to keep this running involved adjusting the gaps on that part. It also would require more uniform lighting and opaque side panels to get the most reliable card detection due to the way the computer vision code was written, though I now know of some ways to improve this significantly if I ever complete V2 (which I started but is a big project!)
This is a StuffMadeHere level project, why doesn't it have more views?
No clue but I appreciate it! I'll catch up to Shane one day 😁
Hey I am a senior in highschool and I’m making my own version of this for my engineering project and was wondering if you have a wiring diagram for it and what voltage you used as your power source for the micro motor on the card shooter. Great project and I’m having a lot of fun building it!
THIS WOULD BE A FUN PRANK WITH YOUR FRIENDS!!!
Very impressive! See everyone should have a hobby to learn how to cheat.... I mean create. Thanks I am a software IT guy and most people have no idea how complicated this project is from concept to implementation. Now if we could get government officials not to cheat that does include lying..Now I need to learn python.
Bro, have I have an ad blocker and you are the only channel that I turn it off on
The ultimate compliment, thank you! :D
Given the ability to set the deck order, and read the deck order, you could actually shuffle in software, and then just build the deck to that shuffle. No need to run through excess shuffles. I'm guessing only 2 would be necessary.
You are right, this should be able to sort into any generic order of 52 cards in two cycles with the following algorithm:
1) Give every card in the arbitrary order an index of 1 to 52
2) Look at the first card to sort. Assuming 8 bins in the sorter, if the card index is 1,9,18, 25, 33 40, 49, 57 (ie start at 1 and count up in 8s) then put the card in bin 1. If the card index is in the set 2,10,19… it goes in bin 2, If the card index is in the set 3,11,20… it goes into bin 3.
3) Reassemble the deck, ensuring bin 1 is at the bottom, bin 2 is next etc
4) Check if the card is in index range 1-8, if so place in the first bin. If in range 9-18 place in second bin and so on up to 52. Do this with all 52 cards.
5) Reassemble starting with bin 1.
This should give you a perfect arbitrary sort - because in the first phase you will have done a pre-sort which puts the cards in an order where the second sort will put it into a perfect order. Because bin 1 in the pre sort contains cards 1,9,10 etc, these will be the first cards sorted in the second sorter pass. In the second sorter pass you effectively have pre-sorted chunks of 8 cards, and the first 8 cards must contain index 1 for bin 1, and index 1 will go to the bottom of bin 1 pile etc.
Hope I’ve explained that enough!
@@AshHartwell I watched this at like, 2AM and didn't want to actually figure out the algo. Thanks for pointing out that Its literally just Radix Sort, base {number of buckets}, in this case 8. And radix sort takes Log (n) sorts, so for 52 cards, you only need 2.
guaranteed Vegas has been done had this technology
It looks like the image processing is taking way longer than your mechanics can handle. (@11:34 you can see the shuffler just waiting.) It's worth looking into some form of faster computing.
Can you give me a hint on the research you did to figure out a roller strategy? I am building a MTG card sorter that will also generate me a CSV output to track my collection. Im worried about handling cards safely but also to process and scan quickly. Have you noticed any damage to your playing cards during usage of this type of roller?
How about if the dealer is required to cut the deck? It makes it 1000x more complicated..
The only way to assure player x wins the pot out of a 9 player Texas Hold'em table, (without the dealer who cuts the cards knowing) is to fix the deck so that 52 combinations all having the same player winning. No matter what point in the deck u start from.
Since there are a millions of possible combos, u can easily write a script of code that will make the player u wish to win, win every hand or every other hand to not make it obvious.
You just need to tell the computer exactly how many players will be dealt in, and it could be done seamlessly.
Bro , this person built this.. now all the casinos have “automatic shuffling shoes” casinos probably spent millions to develop AI technology to use against us