"a type of effective method in which a list of well-defined instructions for completing a task will, when given in neutral state, proceed through a well-defined series of successive states, eventually terminating in an end-state."
Sounds like what we used to call "problem solving" but I may be wrong.
Okay, with reference to the subject under discussion, which I take to be the discipline or lack thereof, of the armies in Spain (but one never knows in this Forum), let me make my first humble and hesitant attempt to apply an algorithim to history.
I will use a British example, as I am getting tired of being accused of leading a crusade against France, the French and the Greatest Frenchman of All.
Okay, the British army wants to prevent its soldiers mistreating Portuguese and Spanish civilians. This, I take it, would be the desired end state of which the definition above speaks.
First, it issues a "list of well-defined instructions" for completing this task to achieve these end states. These are the Articles of War, the Mutiny Act and the Rules and Regulations for the Army, all of which fairly precisely define bad conduct toward civilians and the result.
Private Smith (could be Jones, you never know) goes to Spain and the task is to prevent him from mistreating (murdering, raping, robbing, roughing up, whatever, the civilian population). Private Smith is read, by regulation, the full Articles of War every two months while on parade (see "list of well-defined instructions" above). If that is not well-defined enough, he is also read (again, by regulation), any General Orders having to do with the conduct and discipline of the army, either at the same time as the Articles or on a more frequent basis. Many of these General Orders have to do with sentences passed by General Courts Martial, often ending in execution, particularly for offenders who use their weapons to murder or rob civilians.
So Smith has well-defined instructions and has a choice -- behave properly or misbehave. If he behaves properly and treats civilians well, he, by the definition of an algorithim, moves through a series of successive states to the desired end-state, which is to finish his service in Spain and not mistreat civilians.
But Smith -- being human after all -- doesn't quite conform to what is expected of him. He gets piss-cutting drunk on cheap wine one night and tried to break into the house of one Jose Ortega who vigorously defends his property. Unfortunately, Smith kills Ortega. However, he is caught in the act by his divisional provost marshal and at this point, we have a divergence, I think, of the algorithmic theory.
The provost marshal has a choice. Having caught Smith in the act, he can use summary punishment and string him up from the nearest tree, thus moving through the successive stages of binding his hands, putting the noose around his neck and hauling him up to die, so that he eventually terminates in the desired end state, which has now changed to not have Smith bother civilians again.
Or he can put Smith under arrest and report, through his divisional commander, to Wellington, who then has a choice.
Wellington can use the aforesaid summary punishment and the successive stages described in the paragraph above to terminate Smith in the desired end state.
Or he can send Smith to a General Court Martial which will go through some additional successive stages before achieving the desired end state, which will be the same -- as Smith used violence and murdered a civilian and that usually resulted, if apprehended and found guilty, of an end state consisting of hanging by the neck from a tree.
I am not sure I have grasped it fully but, after all, it is my first attempt at applying algorithms to history.
However, having read over the preceding, I have three questions:
a) What if Smith's name was really O'Reilly?
b) Do you think Ortega's wife and children would understand and approve of algorithms.
c) Do you think the French, being a logical people, would have used the same algorithmic procedure and, if not, why not?
Points to ponder, oh yes.
dg