How Magic Works: Path of Least Resistance and Energy Principles