#### whauk

##### Member

**The general Idea**

I have an idea:

We now have many easily accessible computer programs that can easily search the shortest algorithms for a certain position. (May it be a ZBLL, OLL-CP or something else. It doesn't matter). However the shortest is not always the best. Often people then search for two/three-gen algos or something like F <R,U> F', which might find decent algs. However this involves very much experimentation and time and one cannot be sure, that one didn't miss any good algorithm.

So my idea is essentially to have a computer program, that is able to determine, whether any algorithm is good or bad. Then it would be possible to generate thousands of algs for a certain position and just let the computer program search for the best ones.

How can this be achieved? Let me give a short introduction to neural networks:

**Neural Networks**

A neural network is a computer program that is given a certain input (a move sequence in this case) and produces an output (here how fast the algorithm is) based on numerical data (many example execution times for certain algorithms).

Let me elaborate a little bit:

**Single Neurons**

The smallest element of a neural network is a neuron. A neuron takes several inputs (numbers) and makes a weighted sum out of the inputs and decides whether this is above or below some threshold. Then it outputs a number, that carries the information how much above or below the threshold the weighted sum was. This can be interpreted as the probability, that the neuron should output "yes" resp. "no".

An example might be the following: A neuron has to answer the question "Am I going to the movies today?". As inputs it has the following:

A: Are my friends coming with me? (Value between 0 and 10 equaling the expected value of friends)

B: Is there a movie I like? (Value between 0 and 10 equaling how much I will like the movies)

C: Is there a rat in my basement? (Value between 0 and 100 equaling the expected number of rats)

Clearly C is completely unrelated so we will give it the weight 0. However A and B will influence my decision. A social person might give a huge weight to A, say 5 and a smaller weight to B, say 2. The threshold might encode how motivated the person is in general to go to the movies, say in this case it is 25.

So the neuron computes 5A+2B+0C and compares* it to 25. When it is much bigger it outputs something close to 1 (="yes") and when it is much smaller it outputs something close to 0 (="no"). The output value can be interpreted as the probability, that I will indeed go to the movies.

*The actual computation going on is: . Some clever people came up with this, I don't know how, but I trust them at the moment.

**Networks consisting of Neurons**

This was the process in a single neuron. However to make it useful we have to create a network of many neurons, that interact. For this we encode the algorithm into neuron speech at first, e.g. we have a neuron, that outputs 1 if and only if the first move is an R' and 0 for anything else. For every possible move in any possible position in the move sequence we have a single neuron. Then there is a second layer of neurons, receiving inputs from the first layer, and a thrid layer receiving inputs from the second layer and so on. I don't know how many layers would be practical. The last layer consists of neurons (labelled (x,y)), that have to decide the following question: "How probable is it, that the algorithm can be executed in exactly x.y seconds?"

Taking the highest probability occuring in the last layer we get a definitive answer on how fast the algorithm will be.

**Initial Data**

What is needed to program something like this, is some (maybe a few hundred) sample inputs and desired outputs**, e.g. Sune should yield 0.6, T-perm should yield 0.8 and so on. The neural network will then find the most suitable weights and thresholds on its own (this is the neural network "learning" based on on data).

**However in order to actually do this, one should probably normalize the data. So you don't take the actual time as data, but somthing like actual time divided by time it takes the person to do (RUR'U')6. Then multiple persons can contribute to the learning data in a meaningful way.

**How can this even work?**

There might for example be a neuron, that essentially says "The longer the input, the higher the output". Then there might be a neuron, that detects whether RUR' is a part of the move sequence and if it is, it subtracts a little bit from the total time... and so on...

It is mostly impossible for a human to think of all kinds of little subsequences, that might make an algorithm a little faster. However it is easy to program thousands of neurons, that learn on their own, what makes algorithms faster, and so the neural network as a whole can indeed produce useful values.

**Some blah blah**

So much for the process. How likely is this going to work? I think very! Neural networks can do all sorts of clever things, like read handwriting, recognize faces... recognizing how fast an algo can be executed seems almost trivial, compared to those.

A problem, that is still to be overcome is, that different executions lead to very different times. E.g. Rw U' Rw U2 is much faster than L F' L D2. I have no idea how to fix this... Including every possibility leads to a undesirable high amount of algorithms.

Thoughts on this?

I don't know how to program stuff. Feel free to do it on your own.

**Further reading**: I can recommend this book: http://neuralnetworksanddeeplearning.com/chap1.html