- This topic has 3 replies, 2 voices, and was last updated 1 month, 1 week ago by Dan Damelin.
-
AuthorPosts
-
Someone JoParticipant
Hello, so my game is about how there is 6 cards (two shirts, two pants, two shoes) and another 6 (two shirts, two pants, two shoes) and player pick one randomly from each and if it matches its a success and when they pick a card up we throw it out (without replacement). The problem is that when CODAP randomly output “before cards” and “cards” they are in same columb every time so its a success everytime. How do i make them SEPARATE from each other so that they are both differently randomly chosen 1 by 1.
November 10, 2024 at 3:09 am #10618Dan DamelinKeymasterCan you describe a bit more about this game? You said you pick one from each pile of six and then throw them out. How many times do you pick cards. It seems the maximum would be 6 times before you would start again with two piles of six cards. Is that correct? If you start again, is there a number of times you go through the stacks and restart?
Also are you asking about using the Sampler plugin or some way to do this using formulas?
November 10, 2024 at 3:16 am #10619Someone JoParticipantSo basically there are (1) 6 cards (two shirt cards, two pants cards, two shoes cards) and another (2) 6 cards(two shirt cards, two pants cards, two shoes cards). My game picks from (1), and then pick (2) and then for example if i pick shirt from (1) and shirt from (2) it is success and they get a point. And once player picks a card they do not put it back in the deck, they just discard them. So after first turn (pick 1 from (1) and another from (2)) you start with 5 of (1) and 5 of (2) so i made my sampler (without replacement) which worked fine and also worked fine on showing on experiments/items/output thingy. but since I have (1) and (2) on same table? they always generate random but always match. Do you know what i mean? so they always become shirt – shirt, pants – pants, shoes – shoes which it shouldn’t. I want them to random different from each other.
November 11, 2024 at 8:30 pm #10633Dan DamelinKeymasterWhat you really want is the new version of the Sampler that we are working on now, which allows you to have multiple stages of selection linked together, so you could set up both “decks”, have it pull a card from the first deck and then the second deck, producing a single row of output from both.
Here are a couple of hacky ways you might get around that. In this document I set up two Samplers which would allow you to simulate each deck. (Note, I had to modify the first table some so that the second Sampler didn’t try to put it’s output into that same table.). Then I calculated a lookup value from the first table to combine the data from both “decks.”
In this version, there is one Sampler, but I added a categorical “index” attribute, so you could graph the result of each round of card selection.
Hope this helps.
-
AuthorPosts
- You must be logged in to reply to this topic.