Science can be viewed as an algorithm:
3. Test the hypothesis. (controlled observation, i.e. an experiment.)
4. if the hypothesis survived the test then: its validity has increased,
go to 3.
5. if not then your hypothesis needs to be reconsidered, goto 2.
This algorithm is run in a "computer" called The Scientific Community.
The opinions of the scientific community is the current state of this
algorithm. There are rivaling hypothesises and new hypothesises trying
to overthrow older ones. Now, the nice thing about this algorithm is
that those theories which survive, better represents reality than
those which go extinct.