I was looking for Java's equivalent code or underlying theory for pythons np.random.choice (Numpy as np). I am trying to implement Q-learning in Java. I have a similar implementation that uses Python's np.random.choice method to select the random moves from the probability distribution.
Input list: ['pooh', 'rabbit', 'piglet', 'Christopher'] and probabilies: [0.5, 0.1, 0.1, 0.3]
I want to select one of the value from the input list given the associated probability of each input element.