Talk:Card shuffles: Difference between revisions

mNo edit summary
(→‎Overhand shuffle?: new section)
Line 29:
 
:::::I'll note also that the java implementation uses 1 iteration and 10 iterations for its examples, and uses an example "deck" of 20 integers. Anyways, as much non-procedural detail as makes sense probably goes in the task description. And, I guess also think about what if the language built-in shuffle is Knuth - it's sort of sounding like you don't want that - that you want shuffles with imperfections. So that "needs to be imperfect" belongs in the task description, I think. Like, maybe these numbers are for use in a statistics class, or something... --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 19:09, 28 April 2015 (UTC)
 
== Overhand shuffle? ==
 
I tried an implementation of overhand shuffle, as described at [[wp:Shuffling#Overhand_shuffle]], and it looks like repeated cuts (the "overhand shuffle") do not actually accomplish any shuffling: An overhand cut looks to be equivalent to a rotate operation.
 
Looking at the current implementations, the C++ implementation of overhand shuffle does something different - it reverses the order of one part of the cut (repeatedly using deque's push_back primitive). Meanwhile, the Java implementation doesn't cut the deck back to itself, but to a new deck (with at least five of these "cut operations" per "cut iteration") - something that would be near impossible to do single handedly (which is what the wikipedia description seems to suggest should be done).
 
I'm going to implement it "by the book" - which is something of a joke as a shuffle, since it always retains the order of the deck - until we get a better specification. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 13:32, 18 May 2015 (UTC)
6,951

edits