Projects >> Recursi-Othello-AI >>d4b5ca3f81e128516ba215fc36e9fdb77b4accfd

Chunk
Conflicting content
			try {
				// Algorithm!
				State newState = action.applyTo(state);
<<<<<<< HEAD
				//System.out.println("Root: Before calling NegaMax alpha:"+alpha+" beta:"+beta);
				float newValue = -NegaMax(newState, 1, -beta, -alpha, -flag);
				//System.out.println("Root: got value:"+newValue);
=======
				indentedPrint(0, "Root: Before calling NegaMax alpha:"+alpha+" beta:"+beta);
				float newValue = -NegaMax(newState, 1, -beta, -alpha, -flag);
				indentedPrint(0, "Root: got value:"+newValue);
>>>>>>> 0bb994833f9d0cb49f323376ca870dcac007f07a
				if (DEBUG)
					GraphVizPrinter.setRelation(newState, newValue, state);
Solution content
			try {
				// Algorithm!
				State newState = action.applyTo(state);
				//System.out.println("Root: Before calling NegaMax alpha:"+alpha+" beta:"+beta);
				float newValue = -NegaMax(newState, 1, -beta, -alpha, -flag);
				//System.out.println("Root: got value:"+newValue);
				if (DEBUG)
					GraphVizPrinter.setRelation(newState, newValue, state);
File
NegaMaxDecider.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Variable
Chunk
Conflicting content
					GraphVizPrinter.setRelation(newState, newValue, state);

				alpha = Math.max(alpha, newValue);
<<<<<<< HEAD
				//System.out.println("Root: new alpha:"+alpha);
=======
				indentedPrint(0, "Root: new alpha:"+alpha);
>>>>>>> 0bb994833f9d0cb49f323376ca870dcac007f07a
				// Better candidates?
				if (flag * newValue > flag * value) {
					value = newValue;
Solution content
					GraphVizPrinter.setRelation(newState, newValue, state);

				alpha = Math.max(alpha, newValue);
				//System.out.println("Root: new alpha:"+alpha);
				// Better candidates?
				if (flag * newValue > flag * value) {
					value = newValue;
File
NegaMaxDecider.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Chunk
Conflicting content
	}

	private void indentedPrint(int depth, String s) {
<<<<<<< HEAD
		/*for (int i=0; i < depth; i++) {
			System.out.print("\t");
		}
		System.out.println(s);*/
=======
		if (DEBUG_PRINT) {
			for (int i=0; i < depth; i++) {
				System.out.print("\t");
			}
			System.out.println(s);
		}
>>>>>>> 0bb994833f9d0cb49f323376ca870dcac007f07a
	}
	private float NegaMax(State s, int depth, float alpha, float beta, int color)
			throws InvalidActionException {
Solution content
	}

	private void indentedPrint(int depth, String s) {
		/*for (int i=0; i < depth; i++) {
			System.out.print("\t");
		}
		System.out.println(s);*/
	}
	private float NegaMax(State s, int depth, float alpha, float beta, int color)
			throws InvalidActionException {
File
NegaMaxDecider.java
Developer's decision
Version 1
Kind of conflict
Comment
If statement
Chunk
Conflicting content
	public static void main(String[] args) {
		OthelloState startState = new OthelloState();
		startState.setStandardStartState();
<<<<<<< HEAD
		new Game(new NegaMaxDecider(true, 14),
				 new NegaMaxDecider(false, 14),
=======
		new Game(new NegaMaxDecider(true, 10),
				 new OthelloPlayer(false),//new NegaMaxDecider(false, 10),
>>>>>>> 0bb994833f9d0cb49f323376ca870dcac007f07a
				 startState).run();
	}
	
Solution content
	public static void main(String[] args) {
		OthelloState startState = new OthelloState();
		startState.setStandardStartState();
		new Game(new NegaMaxDecider(true, 10),
				 new OthelloPlayer(false),//new NegaMaxDecider(false, 10),
				 startState).run();
	}
	
File
Othello.java
Developer's decision
Version 2
Kind of conflict
Method invocation