[General boards] [Winter 2019 courses] [Fall 2018 courses] [Summer 2018 courses] [Older or newer terms]

10% Up or Down


#1

“Fish and HungryFish should move up or down about 10% of the time”

Does that mean, if there are 100 iterations, fish move either up OR down 10 out of those 100 times,
OR
out of 100 iterations, fish move up 10 of them AND fish move down 10 of them (so 20 iterations of fish moving up/down)?


#2

The former, every 1000 iterations its y axis should change around 100 times.


#3

But in the code, it’s written like 10% of the time the fish moves up (d < 0.1), and another 10% of the time the fish moves down (d < 0.2), so wouldn’t the vertical coordinate be changing 20% of the time? Is this something we have to fix?


#4

You should fix it, but we probably won’t penalize people that do not.