Saturday 11 February 2017

Teaching Neural Networks using Excel and Scratch

Originally from https://computingnorthampton.blogspot.co.uk/2016/12/experiments-in-teaching-neural-networks.html

Excel Based







Scratch-based
More details available at https://computingnorthampton.blogspot.co.uk/2016/11/miniproject-using-scratch-to-build-and.html including links to the code.

 All views and opinions are the author's and do not necessarily reflected those of any organisation they are associated with. Twitter: @scottturneruonAll views are the authors, and may not reflect the views of any organisation the author is connected with in any way.

Teaching Genetic Algorithms with Excel


In a previous post I discussed using Scratch and Excel to model neurones. This post looks at using Excel and six-sided dice as a way of developing insights into how  Genetic Algorithm work, before going on to program one. 

A very simplified version of Tournament Selection is used for the parent selection and the mutation works by rolling a die to get a number between 1-6.

The problem to be solved is to find the lowest values for x and y in the equation 
(x-6)*(x-6)+(y-1)*(y-1).






Routine


  1. Using an Excel spreadsheet,  roll two dice six times. Fill in the first two columns with these numbers - these are X and Y values for each solution.
  2. The fitness scores should be calculated based on the equation. Low values for this problem are best.
  3. 1st Parent: Roll two dice, if the numbers are same reroll one die to until the numbers are different. Use the two values to select the 1st parent, the solution with the lowest fitness of the two. Take the X part of the selected parent and it forms the X part of the new child solutions.
  4. 2nd Parent: Roll two dice, if numbers are the same or appear in 1st parent, reroll until you get two different numbers (including different to the 1st parent). the solution with the lowest fitness of the two. Take the Y part of the selected parent and it forms the Y part of the new child solution.
  5. Mutation: Roll a die for each part of the child solutions. If the roll is 1, roll another die and replace the appropriate element with the new number – even if the same as the previous value.
  6. Copy the average  into the table and the lowest value 
  1. Copy the child solutions after mutation (orange) into the yellow area and repeat steps 1-6 10 times 





All views and opinions are the author's and do not necessarily reflected those of any organisation they are associated with. Twitter: @scottturneruonAll views are the authors, and may not reflect the views of any organisation the author is connected with in any way.

Green Apple Award for helping teach children to code

Taken from: http://www.northampton.ac.uk/news/university-of-northampton-receives-a-green-apple-award-for-helping-teach-children-to-code/


The University of Northampton has been praised for a competition it helped set up with the aim of improving the teaching of computer coding and school pupils’ technology skills.
The Race to the Top contest, which challenged children across the county to design a digital game or mobile app based around saving energy, was awarded a Gold Green Apple Award by the Green Organisation. These are awarded for projects which are considered to be demonstrative of environmental best practice within the public sector.
The winning teams were from Park Junior School in Wellingborough and Kettering Buccleuch Academy who came up with a game which challenges players to fix degrading solar panels on the school roof and an app which tracks household energy consumption.
The competition was organised by the University of Northampton, in partnership with Northamptonshire County Council, Code Club and the Worshipful Company of Information Technologists (WCIT).
The initiative was part of Northamptonshire’s school improvement strategy and the award was presented at a recent ceremony at the Houses of Parliament in London.
Dr Scott Turner, Associate Professor in Computing said: “The feedback we received from the children has shown that the Race to the Top contest has enthused them and having the opportunity to come to the University campus for the celebration event was a real confidence boost and they really enjoyed it.”


All views and opinions are the author's and do not necessarily reflected those of any organisation they are associated with. Twitter: @scottturneruon

All views are the authors, and may not reflect the views of any organisation the author is connected with in any way.