Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Re: connect 4 with minimax algorithm...Please help me..my algorithm is "stupid" and i dont konw why...

    That's an enhanced for loop. See the tutorial: The for Statement (The Java™ Tutorials > Learning the Java Language > Language Basics)


    If you can have the code recognize when it is near the...
  2. Re: connect 4 with minimax algorithm...Please help me..my algorithm is "stupid" and i dont konw why...

    Why? Can you debug the code to see why it doesn't choose the right value?
  3. Re: connect 4 with minimax algorithm...Please help me..my algorithm is "stupid" and i dont konw why...

    If that is the best move, why does the code chose some other move? Debug the code to see why it is not choosing 5.

    I don't know the game or AI, I can only make suggestions to help you see what...
  4. Re: connect 4 with minimax algorithm...Please help me..my algorithm is "stupid" and i dont konw why...

    If the user plays: 4 3 2 1
    where the computer should have played given the user input provided above?

    How are you debugging the code? I use println() statements to print out the values of...
  5. Re: connect 4 with minimax algorithm...Please help me..my algorithm is "stupid" and i dont konw why...

    Much better. Now could you give a sample of the player's input that could be put into the code to make testing faster and easier? The input can be preloaded into the Scanner's constructor:

    ...
  6. Re: connect 4 with minimax algorithm...Please help me..my algorithm is "stupid" and i dont konw why...

    Some how the code has lost its formatting. Logically nested statements within {} should be indented to make the code readable.
    All the statements should NOT start in the first column.
Results 1 to 6 of 6