An implementation of a decision algorithm based on random