Card Guessing Games! Algorithms Etc.

Discuss whatever you want here--both QB and non-QB related. Anything from the DEF INT command to the meaning of life!

Moderators: Pete, Mods

Post Reply
User avatar
Anthony.R.Brown
Veteran
Posts: 157
Joined: Thu Mar 27, 2014 1:03 pm

Card Guessing Games! Algorithms Etc.

Post by Anthony.R.Brown »

Hi...

Any thoughts on some Best ways to Pick Red & Black Cards Correct from a Real Pack of (52) Cards! ?

If someone Picks All the same Colour then they must Score 50% (26) Correct...So that's the Starting amount to try and Beat!



A.R.B
Attachments
REDBLACK52.BAS.zip
(2.53 KiB) Downloaded 235 times
Last edited by Anthony.R.Brown on Sun Apr 25, 2021 5:59 pm, edited 1 time in total.
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Re: Card Guessing Games! Algorithms Etc.

Post by burger2227 »

Assign the 52 cards numbers in your program. Each number can be used in the real card image file name and they can be chosen from an array randomly, shuffled etc.

If someone picks 26 red cards randomly out of 52 then they are very lucky. The odds are a lot higher than 50%!
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
User avatar
Anthony.R.Brown
Veteran
Posts: 157
Joined: Thu Mar 27, 2014 1:03 pm

Re: Card Guessing Games! Algorithms Etc.

Post by Anthony.R.Brown »

burger2227 wrote:Assign the 52 cards numbers in your program. Each number can be used in the real card image file name and they can be chosen from an array randomly, shuffled etc.

If someone picks 26 red cards randomly out of 52 then they are very lucky. The odds are a lot higher than 50%!
If someone picks 26 red cards (they are Not! doing it randomly!) because the method they use is that every card they choose is by choice the colour Red! which equals (52) picks of the same colour! Guaranteed to score 50% (26) cards Correct!

Now back to the Challenge! I have an Algorithm which always Beats 50% in fact my Best Score is (39) Correct from 52 cards! that's 75% WOW!! (Can anyone Beat that!) :lol:


A.R.B
Post Reply