Search This Blog

Thursday, November 24, 2022

Python Weather app - current conditions from the national weather service

 So, I was reading through a course on XML from W3 schools and in there, it mentioned that current conditions are available as an XML file for various locations.  So I investigated it.  After a bit, I thought I should make a Python program to pull the information from the National Weather Service in XML format and then display this information to the user.

It took some time to refamiliarize myself on the use of the urllib functions in Python to make an http request and download the text of the response.  Then, I needed to learn how to use the XML functions to parse the XML to retrieve the values for each of the tags.  My solution is quite fragile in that any changes to the file format by the National Weather Service will break the code.  Nonetheless, I was quite pleased with myself when I had finally got this working!  So I thought I would share it with the world.

While I don't think that this is going to revolutionize anything, maybe you can re-use some of the code.  Probably the list of the different Oregon locations is the most useful thing.

Here's what the user sees after hitting Fetch:


Wednesday, November 23, 2022

Shopping list and recipe app development plan

 So this is going to be the first of a series of posts that are going to follow along developing a desktop application (mostly cause I don't have an IDE in which I can create a mobile app) that will store recipes, allow the user to make meal plans, and then based on those meal plans create shopping lists for all the ingredients.

The overall plan is going to include:'

  • Defining the requirements that the software has to fulfill from a user perspective.  This would be the functionality that the user expects the software to perform.
  • Defining the technical approach that is going to be used to fulfill the user's requirements defined in the previous bullet.
  • Create a test script to be used to ensure that the software is functioning adequately.  Each of the tests will check that one or more of the requirements have been fulfilled.
  • Perform the testing and then do any required remediation to correct any discovered test failures.
  • At this point, I may end up discussing what additional or changed user requirements could be used for the next version of the software.  But let's not get ahead of myself.
So what are the user requirements?  While I'd like to use a table here, I'd have to create it by writing raw HTML as the blog's UI isn't accommodating of tables so you will have to bear with me as I present it as a numbered list.  While the numbered list will not allow me to, within the list, add a prefix, for any cross-references, pretend that Recipe requirements are prefixed with an R, Ingredient requirements are prefixed with an I, Meal Plan requirements are prefixed with an M, Shopping list requirements are prefixed with an S, and general requirements with a G.

Recipe module

  1. The user will enter for each recipe:
    1. A title
    2. A category for the recipe
    3. The number of servings the recipe makes
    4. One or more ingredients
    5. One or more cooking steps
  2. Recipe categories can be created, edited, and deleted.
  3. Recipe categories will be pre-populated with:
    1. Entrée
    2. Side
    3. Appetizer
    4. Dessert
    5. Snack
  4. Do not allow Recipe Category to be deleted if it is used in an existing dish.  Advise the user of at least one recipe title that they need to address if they try to delete in this case.
  5. For each ingredient, the user will specify:
    1. Quantity to be used
    2. Unit of Measurement of consumption quantity
  6. For each cooking step, the user will specify:
    1. Step number
    2. Text of the step instructions
  7. Recipes can be exported.
  8. Recipes can be imported.

Ingredient Module

  1. For each ingredient, the user will enter:
    1. Ingredient name
    2. Purchase Quantity
    3. Purchase Unit of measurement
    4. Zero or more unit of measurement conversions
  2. Ingredients can be exported.
  3. Ingredients can be imported.
  4. Ingredients can be created, edited, and deleted.
  5. Ingredients cannot be deleted if they are used in a Recipe.

Meal Plan Module

  1. The user can populate the meal plan module with a meal record consisting of:
    1. A Recipe
    2. The number of people dining
    3. The date of the planned meal
  2. An export can be created for a date range showing all the meals planned within that date range.  The export will be a table modeled to simulate a calendar.  Also a multi-level list format will be available.
  3. Meal records can be created, edited, and deleted.

Shopping list Module

  1. The user can create a shopping list for a user-selected date range.  This will produce a shopping list for all the ingredients that will be consumed in the preparation of all the meals in the selected date range for the indicated number of diners and indicate to the next whole purchase Unit of measurement.

General requirements

  1. The user can create different databases.
  2. The user can open a specific database.
  3. There are no security requirements.
In writing this, I've had some thoughts already about other behaviours I'd like the program to have, but I think this is already enough to get on with.  The next post, hopefully within the coming week will discuss the technical approach I will take to providing the functionality defined above.

Friday, May 6, 2022

Articles of the Communal Charter of Amiens

I ran across this page.  Although I suspect I would disagree with those behind the website, it seems to be a well curated collection of texts and for the efforts made to make texts available for free to the public, I am ok with it.  In any case, they have included the articles of the communal charter of Amiens as a document but lamentably, only include a Latin version complaining that an English translation is not available.  As such, I have taken the time to use Google translate as well as a bit of clean up to come up with the following text.  However, it is clear that the translation from Latin is a bit clunky at best and the resulting text is hard to understand.  Had I a better understanding of the history and context of this document, I might be able to sort out questions like whether the resultant "commons" and "common" from Google translate meant "commoner", "commune" or "community" or if indeed there was a commons (either a pasture or city square) that is being referenced within this charter.

In the name of the holy and undivided Trinity. Amen. Philip, king of the Franks, by the grace of God, since our friends and faithful fellow citizens of Ambianenses have often faithfully exhibited to us their service, we have given them a common observance of their love and fidelity to us, at their request; an oath.

1. Each one, under his oath, will justly watch for his faith, assistance, and counsel in all things.

2. Whoever commits theft will be caught within the boundaries of the community, or will be known to have committed it, he will be handed over to our provost, and whatever will be done about him will be judged and done by the judge of communion. To the protestant, our provost shall restore what was stolen, if it can be found; the rest will be converted into our uses.

3. Let no one presume to disturb any one residing among the common stock itself, or with merchants coming to the city with their wares, to disturb the peace of the city below the Banleucam (1). And if any one does this, let him do it in common with him, that he may do justice to the violator of the common law, if he can apprehend him, or anything of his own, to do justice.

4. If anyone has taken away his property from communion with someone under his oath, then, having been summoned by our provost, he will pursue justice; but if the provost of justice should have failed, having been summoned by a major or a [leader], he will come into the presence of communion, and will do there, as far as the [leader] shall judge from it, without prejudice to our right.

5. But he who is least of all from communion, has taken away his property from any one of the commons, and has denied that he will execute justice within Banleucam, after he has made it known to the men of the fort, where he remains; our provost will retain them until he has our own and our generals in like manner.

6. If he strikes with a fist or palm any one of the commons, apart from the customary agitator or lecturer, unless he has acted in self-defense, he will be able to prove it before our provost, before striking two or three witnesses, to give twenty shillings, fifteen shillings for the general justice and five for the justice of the lords.

7. But whoever wounds his oath with arms, unless he will be able to prove himself by the lawful testimony and assertion of the oath by defending himself against the wounded, shall lose his fist, or shall pay nine pounds, six to the firmness of the city and common, and three to the justice of the lords, shall pay the fist as ransom; or if he will not be able to pay, he will deliver the fist in the mercy of the common people, saving the principal of the masters.

8. But if the proud man is so wounded, that he does not wish to receive an amendment at the discretion of the provost and mayor and of a postage, or to provide security, his house, if he has a house, shall be destroyed, and his chattels shall be taken; if he does not have a house, his body will be taken until he has received either an amendment or a security.

9. But he who, by no means existing in communion, has smitten or wound any one of the commons, unless he wishes to execute justice before our provost by the judgment of the common, and, if he may be able, throw to the commons his house, and they will be our capital. And if he will be able to arrest him, he will be taken revenge on him by the district provost before the mayor and scabbards, and our chattels will be.

10. If any man has violated his oath with indecent and disgraceful reproaches, and if two or three have heard him, we have determined to be convicted by them, and shall give five shillings, two to one who is abused, and three to the common.

11. Who would say that it would be dishonorable for anyone in the audience of some common people, if it was made public, and that he would not be willing to defend himself by the judgment of common judges, if he were able to throw to the commons his house, and to stay in common until he amended it? he will suffer, and if he will not make amends, his chattels will be in the hand of the lord king and common.

12. If any one who has taken an oath to his oath, or has lied in good faith, shall be approved before the provost and mayor, he shall be punished by a common judgment.

13. If any man knowingly buys or sells spoils of the common stock, if it shall be proved, he shall lose the spoil, and shall restore it to the spoils, unless any thing be committed against the lords of the common, or from the plunderers themselves.

14. He who cannot prosecute justice after making a claim against his adversary through the provost and major and judges of the common law, if he afterwards shall do anything against him, it will be reasonably common to him, and, having heard of it, he shall judge by reason of what ought to be done afterwards.

15. He who, having been summoned by the mayors and judges and deans, to wit, those who serve the commonwealth, having been prompted to evade justice and common judgment, will knock down his house if they can; but they will not permit him to remain among them until he has satisfied them.

16. Whoever knowingly receives the common enemy in his house, and has communicated to him by selling and buying and eating and drinking, or by providing some solace, or giving counsel or assistance against the common, shall be made guilty of the common; he will be able to lay low the common stock, and the chattels of the king shall be.

17. Within the common limits, a hired champion will not be received against the common man.

18. If any man knowingly violate the constitutions of the commons without a shout, and shall be convicted of it, he shall soon lay the ground for that common house, if possible, and shall not suffer him to remain among them until he has satisfied himself.

19. It is also established that the general should not admit of lands or feudal lords.

20. He who wishes to test the general judges of the falsehood of the judgment, unless he has been able to prove it, is in the mercy of the king, and of the greatest, and of the scabbard, of all that he has.

21. The woman will not be able to sell the dowry which she holds, nor will she be able to send bail except to the nearest heir and from year to year. But if the heir is unable or unwilling to buy it, he must retain the woman for his entire life, and be able to lease it for a year.

22. If any man and his wife have infants, and it happens that their infants die, which of them survives, whether man or woman, whatever they possessed or chosen in like manner. the lieutenant was then made. But if before they have come together, or the husband or wife have had children, after the death of their father or mother, the inheritance of their children will be returned to them, unless there is a fee.

23. If the wife survives after her husband's death, and her children remain alive, the woman will not answer for all the possessions which her husband had in peace, so long as the children will be in custody until she has an attorney, unless he has bail, he will not answer.

24. If any one should seek money from any widow, she will defend herself by oath against one witness, not against many, and will remain in peace; but if she shall seek from her any possession of her as a bail, she will defend herself in war.

25. If any man buy the land or any inheritance from any one, and before it has been purchased, it will be offered to the nearest heir, and the heir will not buy it, he will never again answer to that heir in cause of it. But if it is not offered to the nearest heir, and the one who buys it, the heir seeing and knowing, will keep it in peace for a year, never will he answer it any more of it.

26. If any one has held any possession of his property in peace for seven years, he shall never answer it again concerning it with the present adversary.

27. If any foreign merchant sells anything, and at the same hour could not have his money, he shall first make a noise to the owner of the purchaser, or to the provost of the lord; whatever day it may be.

28. Whoever makes a cry of promise will recover nothing.

29. If any major, or a scabinus, or any of the major justice, has received or inquired of a premium, and he who gives, or by whom the premium has been asked, shall call to the greater, or has a witness concerning this, the accused shall pay twenty shillings; and if he receives a premium, he shall pay it.

30. But if the accuser does not have a witness, he who will be accused by the oath will defend himself.

31. If any one shall bring a shout to the provost, and the provost will not do justice to him, the crier shall bring a louder shout, and the major shall send the provost to the account to do him justice; and if he refuses to do so, the major, without prejudice to the country's law, will do justice according to the rules of the image.

32. If a man has slain any thing that is his own, and he who is accused will answer that he has not knowingly bought it from a robber, he for whom he will be accused will lose, and will defend himself before justice by oath, if the provost or justice will ; And this garanus will do the same, if he shall say the same, both the first, and the second, and the third; but the accuser will confirm by oath what he has cried out, if he who wishes will, who will obtain justice.

33. In every case, both the prosecutor, the accused, and the witness will speak through an attorney if they wish.

34. Let no one presume to make a case outside the city concerning possessions pertaining to the city.

35. If the husband and wife acquire some possession during their lifetime, and one of them dies, the one who survives will have only half of them and the other children. If the husband dies, or the wife dies, and the children remain alive, the possessions, whether on land or in rent, and which part shall come from the dead the relatives of the parents have died, or until their infants have been imprisoned.

36. If any one provokes the king's provost, in a plea or without a plea, with disgraceful and disgraceful words, he shall be in the mercy of the provost, at the discretion of the major and the scabbard.

37. If anyone provokes a major in a plea to disgraceful and disgraceful words, his house shall be thrown down; or according to the price, the house may be redeemed in the mercy of the judges.

38. If any one strike or wound his oath, and he who is struck shall make a cry that he was struck by the old hatred, the striker shall do the right, according to the statutes of the image, for the blow; he will make the common, and he will give nine pounds, namely, six pounds common and sixty shillings for the justice of the lords, and he will pay half of the right within eight days, or the whole, if they wish. For no one will perform the oath for him who kills, whoever he is, either a man, a woman, or a boy.

39. If the mayor sits in the case with the generals and juries, and there someone strikes his oath; his house, against which several witnesses came out, who was the first to strike the blow, was thrown to the ground.

40. But he who is convicted in his case under oath shall pay twenty shillings of the common stock, there the justice of the lords will receive nothing.

41. Whoever casts his oath into the water or into a marsh, if the outcry bears one witness and has seen greater uncleanness, the criminal shall pay sixty shillings, and from these the justice of the lords shall have 20 shillings. If an unclean man has no witness against blood or uncleanness, he will defend himself by oath, and will depart free.

42 But whoever has called his oath, a disobedient servant, a traitor, a wissot (2), that is, a coup, shall pay twenty shillings.

43. If the son of a burgess has committed any forfeiture, his father will execute common justice for his son. But if he shall not be in the custody of his father, and be warned, and evade justice, he must be a stranger to the state for one year. If, however, he wishes to return in the past year, he will do the right thing according to the statutes of the image file provost and mayor.

44. If any agreement has been made before two or more scabies, there will no longer be a battleground or a duel in respect of that agreement, if the scabini, who were present at the convention, shall testify to this.

45. All those major and common laws and precepts we have mentioned above are only among the jurors. There is no horse judgment between a sworn and an uninjured.

46. It was the custom of the Amiens, that, on the feasts of the Apostles, when entering into the country of each of the four chariots through one of the four gates of the city, Guarino archdeacon of Amiens received a penny. The elder and the scabini, who existed at that time, by the advice of Theodoric, then bishop of Amiens, purchased from the archdeacon the aforesaid custom, at five shillings and four capons; and the archdeacon takes that tribute at the furnace of Firmin's Cloister, situated outside the gate of Saint Firmin in a valley.

47. On all the tenements of the town justice will be shown by our provost, three times a year in the general plea: namely, on Christmas, Easter, and Pentecost.

48. Moreover, the major and the scabini shall judge all forfeitures which shall be made within the banleugam of the state, and shall do justice to them, as they ought, in the presence of our bailiff, if he will be present there; but if he will not be present, or will not be able to do justice for his absence, they will not cease to do justice, but will do justice to him, with the exception of many and many rape, which we retain for ourselves and our successors forever, without the other's side.

49. Our chattels of murderers, arsonists, and traitors are absolutely, without regard to the other. In the chattels of other criminals, we retain to ourselves and to our successors what we have and ought to have.

50. No one can make a ban in the country except through the king and the bishop.

51. If anyone is banned for any forfeiture, except for the many, murder, arson, treachery, rape, the king, the steward, or the king's provost, bishop or major, each of them will be able to hire him once a year in a villa.

52. We will also, and we will perpetuate the commonwealth, and grant that it may be lawful for us, and our successors, to send the city of Ambiaan or the common stock without our hand, but that it always clings to the crown royally.

To ensure that all these things remain permanently ratified and stable, we confirm the present page of our seal with the authority and stylus of the royal name annotated below, without prejudice to the right of bishops and churches and nobles of the country and of foreign law. Act of Lorriacus in the year of the incarnation of the Word in the twelfth year of our reign. Those standing in our palace whose names and signs have been placed: S. Count Theobald, our waiter; St. Guy, buticular St. Matthew, chamberlain S. Ralph, constable. Chancery vacancy date.

(1) This appears to be a reference to a geographic place within Amiens.  "banlieu" is French for suburb and thus it may be intended to refer to the surrounding areas to Amiens that are still within the jurisdiction.

(2) The original marks this as "alias wisloth" which is well, not insightful either, but from the context, it is clearly a pejorative term.


Saturday, January 2, 2021

Book Review: Rescher's Free Will

Rescher's Free Will: A Philosophical Reappraisal [0] argues for a compatibilist view on the question of free will.  He very carefully presents his argument to reconcile the internal subjective experience of deliberate free decision and action within the current objective scientific view that the universe is deterministic.  The pages span various arguments for and limitations to free will that asserts that humans are ration beings that make "choices".  But despite the quantity, depth and breadth of the arguments presented, he demurs that the book "does not lay claim to the status of a categorical proof." [1]  He alludes to the ramifications at the end with regards to ethics and how we should understand ourselves.

The sort of free will envisioned by Rescher is very limited in comparison to the oft imagined "can try anything at any time" sort of freedom. He limits this freedom to choose otherwise only "if something-or-other and [sic; had?] been different." [2]  He rejects that agents have the possibility to choose differently if it were possible to somehow re-play the choice made as showing that the agent is not rational.  However, the determinism must not by-pass the agent either, the agent's internal deliberation and resulting decision are necessarily in the stream of causality, but these have a different quality than natural phenomena.  In contrast, a hard line materialist view can be summarized as "an illusion.  The experience we have of deliberating before some important decision is a mere bit of electrical chatter that our brains generate, the effect of which is to obscure from us the fact that our decision was cast before we were even aware of it." [3]  Thus, although Rescher does not postulate some supernatural decider such as a mind, the subjective experience of deciding is nonetheless elevated above other natural phenomena.

Overall, Rescher argues ardently on the question and common objections to the compatibilist position from both advocates of determinism and free will.  These are technical in nature and for someone leaning in the general direction, I suspect, quite convincing.  Even if one leans away, there is much here worth mulling over.  Overall, it seems that there is a dichotomy between subjective experience and objective reality.  Perhaps it can be thought of as akin to Heisenberg's uncertainty principle where position and momentum of a particle cannot be known to a high degree of precision at the same time.  One can address the question from the perspective of materialistic science or by analyzing the subjective experience, but doing so from both at the same time leads to unresolvable paradoxes.

Suppose you and I are playing billiards.  The playing table, suitably situated in the pub down the road such that relativistic and quantum level effects are negligible, is deterministically defined through Newtonian mechanics.  As each player takes a turn, the shot one will take, while affected by the situation on the table, is not predetermined by that situation, but rather determined by the player's deliberation.  One can discuss the forces, momenta and positions of the balls and predict the result of the shot taken, or one can discuss the motivations and strategy of what shot should be taken, but not at the same time.  The key feature is that different rules apply depending whether you are analyzing the movement of the balls or deliberation of the thoughts.  But you cannot find a single set of rules to analyze both at the same time.  Well, it's a thought.


[0] Rescher, Nicholas. Free Will: A Philosophical Reappraisal. United Kingdom, Transaction Publishers, 2009.  Note: this version did seem to have a higher quantity of typographical errors than other books I have read.

[1] Rescher, p. 162

[2] ibid, p. 50.

[3] Crawford, Matthew B.. The World Beyond Your Head: On Becoming an Individual in an Age of Distraction. United States, Farrar, Straus and Giroux, 2015.

Wednesday, December 23, 2020

Book review: Graziano's Rethinking Consciousness

Michael Graziano's Rethinking Consciousness, A Scientific Theory of Subjective Experience [0] is a popular science book where he elaborates in a non-technical way about his attention schema theory and concludes the book discussing implications for artificial intelligence and uploading minds.  During the journey, he explains his materialistic view of what consciousness is.  His definition is that consciousness  is the ability to have a subjective experience.  He explains that through neuroscience, consciousness, or one's subjective experience, arises from the attention schema which constructs a rough simple model of the world which determines what stimuli one's attention should focus on.  This interplay between stimuli, the underlying neural network, and the attention schema creates the feeling that one has a mind or subjective experience.  Consciousness is not an illusion nor is it something non-physical such as a soul or essence, but rather, it emerges from the ingredients similarly to temperature and pressure emerge from the average speed of atoms in a gas in a container.

This first part of explaining the foundation necessary for the attention schema theory and how that theory actually works is somewhat confusing and left me with a feeling that somehow it was all begging the question...the conclusion was somehow assumed in the premises of the argument and it ended up in a big circle.  But the next part speculating on the application to artificial (and given enough technical progress, biological) intelligence is worth the slog.  He posits that there are 4 essential elements to a being that can have consciousness or a subjective experience: (1) be able to pay attention to something; (2) an attention schema that can shift the attention between different things; (3) a wide range of content (memories, data, etc.); and (4) the ability to search the content to find relevant facts on which the attention schema can make decisions to direct the attention.  Following this explanation is a survey of the state of technology (in 2019) to be able to instantiate the necessary pieces to construct an artificial intelligence per this blueprint.  In the discussion, emotional states and body awareness are mentioned as two possible additional necessary elements to arrive at consciousness as we know it.  Graziano speculates these could be added virtually for artificial intelligences, but need more consideration in the biological scenario.

This deconstruction of the necessary elements of consciousness, Graziano suggests, could provide a means to test for it.  Certainly, a computer program that was written to be an artificial intelligence could be examined to see if it in fact fulfilled the requirements.  Biological wetware is harder to examine, but morphological differences between brains would show whether the structures where we currently believe the processes take place are present.  As scanning resolution increases (cue the alien abduction visual), scanning and probing could allow verification that these essential elements are present.  Based on morphology, he asserts that only the higher mammals have consciousness.  One of the consequences of what Graziano proposes is that consciousness is algorithmic.  So, on the question of Searle's Chinese Room paradox, it seems Graziano would argue that the room (not the person within), is conscious. [1]  Thus any Universal Turing Machine can become conscious given the right algorithm and enough data.

The last portion of the book focuses on the possibility of uploading one's mind, whether the Matrix is possible, and the ethical challenges with duplicate "selfs", if such are ever constructed.  While interesting, given how far technology has to go, it remains firmly in the realm of science fiction.

My motivation for reading this book came from discussions on the topic of free will.  Graziano offers no opinion overtly.  The materialistic approach of the explanation suggests he might fall into the determinist camp although he does offer that consciousness is not necessary for decision making [2] and usually, it is argued that consciousness is necessary for free will.  And so, I will end it here and I have Rescher's Free Will [3] on my night stand, borrowed through interlibrary loans from the University of Idaho.  I am in the middle of chapter 1 and already have a lot of reactions to put into words.  (stated that way as a preview of what's to come!)


[0] Graziano, Michael S A. Rethinking Consciousness: A Scientific Theory of Subjective Experience. United States, W. W. Norton, 2019.

[1] https://plato.stanford.edu/entries/chinese-room/

[2] Graziano, p.6

[3] Rescher, Nicholas. Free Will: A Philosophical Reappraisal. United Kingdom, Transaction Publishers, 2009.

Sunday, December 6, 2020

Book Review: Free Will by Sam Harris

 Sam Harris' Free Will [0] is a thin volume (one of the jacket blurb mentions 13,000 words) that is easily digested in an afternoon.  He sets out to show that two assumptions are false: "(1) that each of us could have behaved differently than we did in the past, and (2) that we are the conscious source of most of our thoughts and actions in the present."  Both of these are approached from a neuroscience perspective.  Neuroscience has made progress in mapping conscious and unconscious mental states and processes to physical brain states and changes. [1] Some of this comes from analysis of people with brain injuries. [2]

Examining through introspection, it seems that the thoughts that occur are self-generated.  The way thoughts appear to ourselves is highly suggestive that we have free will.  However, since much of what happens in the brain is not accessible to introspection and we know that some of the heuristics used by the brain can be easily manipulated [3], the introspective conclusion is suspect at best.  For example, having sat on the beach observing carefully for ideas for next year's sandcastle building competition, one would also notice the movement of the sun over the course of the day and conclude that the sun moves around the earth.  But of course this is an illusion.  Physiologically, Harris argues, the conscious thoughts and decisions come from the unconscious which has been ultimately influenced by externalities and therefore no thought or decision can truly be created ex nihilo.

The question that arises here is whether the existence of prior influences are sufficient that thoughts and decisions are pre-determined or is there room for a person to have bechaved differently in a given situation. A die thrown with a certain velocity and spin onto a specific surface will stop with the same number on top under Newtonian mechanics.  That we may not be able to predict it because we do not know the specific values of the velocity or spin does not negate the fact that repeating the throw exactly will not alter the result.  The sources and effects of the pre-determining influences on our thoughts are vast and diverse so as to make it currently impossible to determine.  (Although, one might consider "psychohistory" envisioned in Asimov's Foundation series as a basis for a methodology. [4])

The definitive experiment would be to run time forward and backward over some point in time to see if indeed one behaved differently.  Again, under Newtonian mechanics as well as Einstein's relativistic mechanics, outcomes are pre-determined and therefore would never vary although they may be difficult to compute.  Quantum behaviour, such as where an electron will hit a screen after passing through a double slit, is not pre-determined although there are regions where the probability is zero.  For the regions with non-zero probability, there is no calculation made or process used that can narrow the result a given trial any further than the computed probability density.  For many, this has given hope that if the physiological mechanics occur at scales sufficiently small that quantum effects can result in different outcomes for the same set of inputs, then a physiological basis for free will is established.  Unfortunately this may be a pyrrhic victory in that one does not consciously think and decide upon a course of action, it is merely chosen for us through the arbitrary collapse of a wave function somewhere amongst the myriad of neurons in one's brain.

Another argument that gets raised is the emergent complex behaviour of simple systems such as, for example, cellular automata [5]: the "self" that thinks thoughts and decides decisions is something arising out of the complexity of the neural network in the brain and is distinct from the underlying substructure.  But this emergent behaviour is not something that exists of itself and is merely pareidolia no more autonomous than the patterns of dots occurring in the cellular automata simulation.  Of course there is a difference between simple cellular automata and a human brain in that the brain does exhibit the ability to learn and change behaviour based on this learning.  But learning should not be mistaken for free will, it is an improvement in the ability to predict outcomes and thus is another input into the calculation of what is next thought or decided.

Harris dismisses the compatibilist view as simply a post hoc justification of what has occurred which does not substantiate that an alternate history could have happened.  When it is asserted that someone or something, other than the self, has free will, this is based on observation that it behaves in ways that are self-generated, goal-seeking, and non-uniform in response the same stimuli.  However, rule-basead "artificial intelligences" such as computer opponents in various games also display these traits as do most animals.  Assertions about free will are about interior states not amenable observation and where self-reporting is suspect as explained above.  As a result, when discussing the past, at best one can provide an enumeration of roads not taken, and when discussing the future, it devolves into an analysis of constraints on free action.  Far from making the case for free will, it is not even wrong.

Thus Harris succeeds in his argument for determinism and concludes with some discussion on the implication that people are not the authors of their actions.  Since much of morality considers the intent to cause harm a prime consideration as to the morality of an act, does determinism make morality irrelevant.  Harris argues that it does not make morality irrelevant but rather it suggests that punishment does very little (except in a Pavlovian sense) to deter unwanted behaviour.  Determining desired and undesired behaviours (i.e. what is moral vs. immoral) does not change whether people have free will.  However, how justice is meted out must change once you accept that people do not have free will.  While containment of dangerous persons and deterrence through the threat of punishment is necessary for the greater good, rehabilitation should be the focus rather than incarceration as punishment.

The persistence of the illusion of free will is not difficult to explain.  Human beings tend to give themselves credit for good things and blame bad things on externalities.  When someone achieves a goal or completes a project or provides for their family or community, these good things are attributed as achievements of the self, including that they are self-generated, innovative, or even brilliant solutions to problems that others have failed to solve.  The credit is then given to the conscious self because of the physiological reaction of good feeling that follows.  Bad things that happen are blamed on externalities because if one admits the harm done, if often results in a physiological reaction of bad feeling.  Whether good achievements are self-generated or are the results of externalities does not diminish their good.  The key here about bad things is that humans do have a capacity to learn which can lead to a change in behaviour in a future similar situation.  This learning comes from the sum influences on the individual and is not a function of some illusory free will to learn.


References:

(0) Harris, Sam. Free Will. India, Free Press, 2012.

(1) https://www.thebigq.org/2020/11/26/what-are-some-of-the-key-developments-in-cognitive-neuroscience-%E2%96%B6/

(2) Ananthaswamy, Anil. The Man Who Wasn't There: Tales from the Edge of the Self. United States, Dutton, 2016.

(3) Judgment Under Uncertainty: Heuristics and Biases. Spain, Cambridge University Press, 1982.

(4) Asimov, Isaac. Foundation. United States, Random House Publishing Group, 2004.

(5) https://lifeinbeaverton.blogspot.com/2019/01/python-version-of-game-of-life-cellular.html

Saturday, October 3, 2020

Time series on Oregon State Rep and Senator

 So I have calculated the gerrymandering co-efficient for Oregon State Representatives and Oregon State Senate for the years from 2002 to 2018.  The co-efficient is stable for the State House of Representatives and does show that the re-districting resulting from the 2010 census had some effect in 2012.  The coefficient for the Oregon State senate is unstable.  One of the issues here is that approximately half of the senate seats are voted on every 2 years with possibly some special 2 year terms to replace vacancies.