freggo :
As a former game coder I disagree.
A good algorithm is simply providing the most effective or logical solution for a given situation.
As such it is not a "law of physics" but a "law of logic" than one patents.
This should not be confused with the algorithm for say the AI of a game. That's not necessarily dictated by outright logic of course.
Laws of nature (physics, chemistry etc) cannot be patented, nor can mathematical formulae, or software per se. The only 4 permitted categories of patentable inventions for a utility (useful) patent are a method, device or apparatus, composition of matter or article of manufacture. And currently method claims have to be tied to one of the other 3 categories, according to recent court decisions (In re Bilski in case anybody is interested). While you could view a software program as a sort of potential method, it cannot "do" anything without being run on a processor or other device that processes the instructions. Of course, to do that it has to be in a form the processor can understand - a paper printout usually cannot be used on a computer lacking scanning & OCR capabilities..
The patent rule book (or Manual of Patent Examining Practice) is something like 6 inches thick, and the US patent system is 222 years old now, ever since Thomas Jefferson was the first patent examiner - in fact, he was the entire Patent Office, along with being the Secretary of State
😛 - back in 1790. During that 2-1/4 centuries, various courts have interpreted and embellished the original patent clause in the US Constitution (article 1, section 8). So that's why patent law is pretty arcane and often doesn't make sense in modern times. For example, right now you cannot patent a signal, so if you invent a method and device for, say, flashing your BIOS or UEFI by wifi or bluetooth, you can claim the method and/or the device, but not the signal with the flash information encoded on it. Ditto with software - it has to be claimed as a method (software executing on a processor) or a device (a computer running the software) or as being stored on a non-transitory computer readable medium (like a CD, DVD, memory, flashdrive, etc), with the "non-transitory" part necessary to exclude anything like a signal. The idea behind the rules is that a signal is 'not real' or something that you can hold, sniff, see or hear or taste, and that software by itself does not do anything useful which is the basis for a utility patent.
I disagree with both those ideas - anybody who doesn't think a signal can be real should put his hand inside a microwave oven during operation, even tho it's just a 'carrier wave' and not a modulated signal. And software should be able to stand on its own without having to be claimed as something else. But these are just my opinions and unlikely to change the "business as usual" with the USPTO bureaucracy..