Subject: Day 20: forgive me Father for I have semi-sinned
Author:
Posted on: 2017-12-20 22:01:00 UTC
Firstly, this link heads to the code.
Now, in reference to the title, "loop until the answer stays the same for a while" is a valid technique in nemerical simulation code ... which this is. However, usually it would help to have some assurance that the system won't do arbitrary weird stuff a few more iterations after you stop looking, and that it'll actually settle down eventually. That is, you'd like to be convinced of stability.
However however,
a) The contest organizers assured us the procedure would be stable.
b) In practice, everyone just rolls with it except where the book said you need to watch out for stability issues.
- Tomash