troydeville / NEAT-swift

Implementation of Neuroevolution of Augmenting Topologies in swift.
13 stars 6 forks source link

Game template #2

Closed gabrielokura closed 9 months ago

gabrielokura commented 9 months ago

Hi,

I'm trying to use your implementation of NEAT in a 2D game and I'm facing this issue:

image

My implementation is similar to

queue.async(flags: .barrier) {
            for i in 0..<self.aliens.count {
                let alien = self.aliens[i]

                let inputData: [Double] = alien.generateInputDataForNeuralNetwork()

                let output = self.network.run(inputs: inputData, inputCount: self.inputCount, outputCount: self.outputCount)
                self.network.nextGenomeStepOne(alien.fitnessLevel)

                alien.move(x: output[0], z: output[1], breakValue: output[2])
            }
        }

Also, if it's not too much, could you show your rocket game template with the NEAT implementation?

Thanks!