How can one manage thousands of IF...THEN...ELSE rules?

Posted by David on Programmers See other posts from Programmers or by David
Published on 2011-08-25T18:24:27Z Indexed on 2012/03/25 11:40 UTC
Read the original article Hit count: 360

I am considering building an application, which, at its core, would consist of thousands of if...then...else statements. The purpose of the application is to be able to predict how cows move around in any landscape. They are affected by things like the sun, wind, food source, sudden events etc.

How can such an application be managed? I imagine that after a few hundred IF-statements, it would be as good as unpredictable how the program would react and debugging what lead to a certain reaction would mean that one would have to traverse the whole IF-statement tree every time.

I have read a bit about rules engines, but I do not see how they would get around this complexity.

© Programmers or respective owner

Related posts about design

Related posts about design-patterns