Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Minimax

  1. #1
    Member Scotty's Avatar
    Join Date
    Oct 2010
    Posts
    60
    My Mood
    Scared
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default Minimax

    I am writing a game. If you assume I have the game tree, can you suggest a good minimaxing algorithm. I have one, but it doesnt always work brilliantly. Any suggestions.

    I basicly find the smallest value of the opponent moves and group them into board positions. (Ie smallest value while at (i,j) when the counters before that are moving across possible positions). Then with the last AI piece I find the biggest. Find where opp was at when that was in that position. And then trace back to were the first piece needs to go to hope opp takes that position.

    It seems to work at first, but as more positions are added in game it gives up


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,156
    My Mood
    Hungover
    Thanks
    141
    Thanked 595 Times in 510 Posts

    Default Re: Minimax

    There is not one, single, all-encompassing algorithm for a minimax search- it's going to depend on many things that only you know. You haven't even told us what game or application this is for.

    Developing a good minimax search algorithm isn't an exact science (unless you're talking about something very simple). Chances are you're just going to have to play around with it until you find something reasonable.

    But what do you mean by "it gives up"?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. CONNECT FOUR GAME-MINIMAX TO ALPHABETA ALGORITHM
    By AJreal in forum Algorithms & Recursion
    Replies: 0
    Last Post: March 6th, 2011, 02:30 PM
  2. Connect 4 involving minimax.
    By mandar9589 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 21st, 2009, 10:52 AM