how does a heuristic differ from an algorithm 
an algorithm is a step by step set of instructions that are followed to achieve some goal or outcome often optimizing that outcome they are formalized and can be expressed as a formula or recipe as such they are reproducible in the sense that an algorithm will always provide the same output given the same input a heuristic amounts to an educated guess or gut feeling rather than following a set of rules or instructions a heuristic is a mental shortcut moreover it often produces sub optimal and even irrational outcomes that may differ even when given the same input 