Say if you have a 2 identical arrays of n elements say with numbers from 1 to 10. You randomly pick an item from each array and check if they match. For one iteration the right match can be (10,10) or (3,3) as it randomly changes every time. Since both the arrays have 10 elements, getting the right match overall is very infrequent, if you pick a random number from each array. So each time, a specific weight can be assigned to the right match to increase this frequency. My question is how much weight do you assign the right match so it is more frequent but still seems random enough? How do you decide this?
Aucun commentaire:
Enregistrer un commentaire