Bryan
Bryan

Reputation: 15

Neat-python FeedForwordNetwork.activate takes 2 positional arguments but 7 were given even though config file shows 6

When I ran my neat code I got this error in FeedForwardNetwork.activate() :


output = nets[x - 2].activate(player_.red_x, player_.red_y, player_.blue_x, player_.blue_y, player_.catcher,
TypeError: FeedForwardNetwork.activate() takes 2 positional arguments but 7 were given

I am unable to load imgs as I don't have enough reputation, but here is an image link: IMG

This is what I did to load the file

if __name__ == '__main__':
    local_dir = os.path.dirname(__file__)
    config_path = os.path.join(local_dir, "config.txt")
    run(config_path)

Upvotes: 0

Views: 172

Answers (1)

Bryan
Bryan

Reputation: 15

Put the items in a list.


output = nets[x - 2].activate([player_.red_x, player_.red_y, player_.blue_x, player_.blue_y, player_.catcher,last_parm])

Upvotes: 0

Related Questions