| 82 | } |
| 83 | |
| 84 | double LSInterpolator::normalize(const std::vector<Wire> &wires, const std::vector<double> &action, double maxReward) { |
| 85 | double answer = 0; |
| 86 | for(std::vector<Wire>::const_iterator a = wires.begin(); a != wires.end(); ++a) { |
| 87 | answer += 1.0 / distanceBetweenWireAndAction(*a, action, maxReward); |
| 88 | } |
| 89 | |
| 90 | return answer; |
| 91 | } |