public void updateReward(State s)
	{
		double outputReward = s.stateScore();
		if (outputReward != 0)
		{
			visits++;
			
			double alpha = (double)(1/(double)visits);
			double secondpart = alpha * gamma * outputReward;
			double firstpart = (1-alpha) * reward;
			reward = firstpart + secondpart;
			
		}
	}