user10034548
user10034548

Reputation:

How can I get a range from negative infinity to infinity to be represented in a range from 0 to 1?

Sorry, hard to explain. How can I get any number to be represented as a number 0 to 1 for my AI? I am trying to get a set of data to be a binary number to make a decision based off of it.

This is for my first AI, I tried making an average based on the min/max, but decided that an exponential function would be better.

I just want something that would round to a 0 or 1 so that my AI can make decisions.

Upvotes: 1

Views: 1473

Answers (1)

FFF
FFF

Reputation: 274

You can use the sigmoid function, 1 / (1 + exp(-x)).

https://en.wikipedia.org/wiki/Sigmoid_function

Upvotes: 6

Related Questions