yojimbos_law

nuns simulator with and without sing with no nuns trick.

Jun 5th, 2018
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. float meat_boner = 4.7019;
  2. int times = 500000;
  3. int meat_drop;
  4. int meat_remaining;
  5. int turn_counter;
  6. int total_turns_sans;
  7. int total_turns_with;
  8. int rround(float butts){
  9. float remain = butts%1;
  10. if(remain * 100 <= random(100)){
  11. return floor(butts);
  12. }
  13. else{
  14. return floor(butts+1);
  15. }
  16. }
  17. //nuns without singing along.
  18. for i from 1 to times{
  19. meat_remaining = 100000;
  20. turn_counter = 0;
  21. while(meat_remaining > 0){
  22. turn_counter++;
  23. meat_remaining -= rround((800 + random(201) + random(201))*(1+meat_boner));
  24. }
  25. total_turns_sans += turn_counter;
  26. if(i%10000 == 0){
  27. print("simulations+=10k.");
  28. }
  29. }
  30. //nuns with singing along and the +30% meat boner from boombox.
  31. for i from 1 to times{
  32. meat_remaining = 100000;
  33. turn_counter = 0;
  34. while(meat_remaining > 0){
  35. turn_counter++;
  36. meat_remaining -= rround((820 + random(201) + random(201) + random(11))*(meat_boner+1.3));
  37. }
  38. total_turns_with += turn_counter;
  39. if(i%10000 == 0){
  40. print("simulations+=10k.");
  41. }
  42. }
  43. float EV_sans = (total_turns_sans.to_float()) / (times.to_float());
  44. float EV_with = (total_turns_with.to_float()) / (times.to_float());
  45. print("EV with singing: "+EV_with.to_string());
  46. print("EV sans singing: "+EV_sans.to_string());
Advertisement
Add Comment
Please, Sign In to add comment