Tuesday, September 21, 2021

Morning After

 Congratulations to all who partcipated in yesterday's election: 

that was true grit, in difficult times.


From Wikipedia, the results in 2019 qnd 2021.(There was 1 Independent in 2019)




I am surprised that no one has mentionned that there is no provision in the constitution

about who might be competent to do things like carbon emissions trading. Going into the

future, this is no minor issue. And for those not following Quebec news, Mrs Anglade 

of the provincial Liberals announced yesterday that her party would endorse disinvesing

in gas and oil production within Quebec in 2022 (the next provincial election).


Oh, and  Canada's debt to GDP ratio might not be quite so fine. We are actually

number 3 behing Italy and Spain...




                                  *     *     *

The two search algorithms used so far had in common that they had

no connection with the peculiarities of the problem. Thus, one couldn't choose

for oeover the other a priori; they were uninformed. An informed algorithm uses 

information about the problem. 


Greedy Best-first search introduces a heuristic function to the problem In th case

of maze problems, one would choose the node known to be closest to the arrival

point. One can tell this won't always work, but it mght make life easier when it does.

The heurisric in the example below goes by the charming name of Manhattan distance,

which is the distance mesured by the coordinate system.






So voilà, using greedy best-first search does find a solution; but we will need to be

more clever to find an optimal solution.


A*search will do that. It will use both the Manhattan distance and  the cost of reaching the

node in the first place.











No comments: