How do i do this help **URGENT**

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10617 Score: 0
    Someone Jo
    Participant

    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.

    #10618
    Dan Damelin
    Keymaster

    Can 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?

    #10619
    Someone Jo
    Participant

    So 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.

    #10633
    Dan Damelin
    Keymaster

    What 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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.