from Cube import Cube from Brain import Brain NewCube = Cube() NewBrain = Brain() #We have nothing to go on so we just implement a random brain #let's start with a simple test 1 layer, 40 neurons NewBrain.InitializeRandomLayerNeurons(1, 40) NewCube.ScrambleCube(20) print("Starting Cube:") NewCube.Print() print() for Moves in range(0, 10): print("Move: " + str(Moves)) #Feed our brain the information and let it reach a decision InputNeuronsToActivate = NewCube.GetInputNeuronsToActivate() for NeuronID in InputNeuronsToActivate: NewBrain.InputNeurons[NeuronID].Activate( 0) #don't weight the starting gun HighestOutputNeuron = NewBrain.GetHighestOutputNeuron() print("Highest Output Neuron is: " + str(HighestOutputNeuron)) print("With Weight: " + str(NewBrain.OutputNeurons[HighestOutputNeuron].AccumulatedWeight)) #perform the move if HighestOutputNeuron == 1: NewCube.RotateWhiteFaceRight() elif HighestOutputNeuron == 2: