1. #1

    Talking Beginner AI development books - Java

    Hey guys, this may seem like an odd post for mmo-champion but hear me out.
    I am a senior at TAMU studying to be a programmer with a focus in Artificial Intelligence. I also happen to love gaming. Can you suggest to me books that would suit my needs?
    First and foremost I'm looking for:
    - Beginner level AI
    - JAVA specific
    - Published within 5 years

    Then if you don't know of any that fit those 3 requirements, feel free to offer any of your personal suggestions with no bounds on skill level or language. I would prefer you stick to languages like C#, C++, JAVA etc..

    Thanks for your help

  2. #2
    A lot of AI is logic/theory not specific to a particular programming language. Java AI is no different than Python AI, Perl AI, C AI, etc. the same logical constructs will go into AI no matter what language you use.

    The next thing to consider is what type of AI are you interested in? Human conversationalist AI? Chess/Tic-tac-toe? 20 questions? Automated tutoring/customer service? Clustering and text processing? Predictive AI? Connectionist AI? There are so many different fields of AI that all have different logic.

    All that being said, I would recommend the book I used in my Artificial Intelligence class at University, Artificial Intelligence: A Modern Approach The most recent edition was released in 2009, and its pseudo-code has implementations available in Java, Python, and Prolog. All in all, a rather useful text book.
    Author of Instance Profit Tracker
    Find out how much gold you earn soloing raids and dungeons

    Curse | GitHub
    WowInterface

  3. #3
    I forgot to mention the type of AI like the poster above mentioned. For the short term I'm looking for games like Chess, Checkers, Reversi, etc.. I'm currently working on a reversi game that supports Human V Human locally or over the internet.. My next task is to implement AI vs Human and I only have language specific books, none like the one you've suggested. I'll google some book reviews. Thanks for the reply!

  4. #4
    For game AI like chess and reversi, the essential AI logic is minmax, what is your best move that results in your opponents worst move? For reversi, this is simple to calculate, out of all possible moves how many pieces will you win/lose. The most basic approach would be one level deep, pseudocode:

    Code:
    array moves = getListOfPossibleMoves();
    int bestMoveIndex = 0;
    int bestMoveValue = 0;
    for(int i = 0; i<moves.length; i++){
    int moveValue = getMoveValue(moves[i]);
    if(moveValue > bestMoveValue)
    bestMoveIndex = i;
    }
    makeMove(moves[bestMoveIndex]);
    To make it a bit more advanced you would look at later levels. So for each move the moveValue would be the number of pieces you win minus the most number of pieces your opponent could win if you make that move. Be cautious, unless you use an advanced search algorithm like A*, alpha-beta with pruning, etc. going beyond 3-4 levels would likely be very slow. Maybe not for reversi, but definitely for chess. If you have multiple difficulty levels, each level could correspond to a different amount of moves that the computer will look ahead.
    Author of Instance Profit Tracker
    Find out how much gold you earn soloing raids and dungeons

    Curse | GitHub
    WowInterface

  5. #5
    Quote Originally Posted by Arcilux View Post
    For game AI like chess and reversi, the essential AI logic is minmax, what is your best move that results in your opponents worst move? For reversi, this is simple to calculate, out of all possible moves how many pieces will you win/lose. The most basic approach would be one level deep, pseudocode:

    Code:
    array moves = getListOfPossibleMoves();
    int bestMoveIndex = 0;
    int bestMoveValue = 0;
    for(int i = 0; i<moves.length; i++){
    int moveValue = getMoveValue(moves[i]);
    if(moveValue > bestMoveValue)
    bestMoveIndex = i;
    }
    makeMove(moves[bestMoveIndex]);
    To make it a bit more advanced you would look at later levels. So for each move the moveValue would be the number of pieces you win minus the most number of pieces your opponent could win if you make that move. Be cautious, unless you use an advanced search algorithm like A*, alpha-beta with pruning, etc. going beyond 3-4 levels would likely be very slow. Maybe not for reversi, but definitely for chess. If you have multiple difficulty levels, each level could correspond to a different amount of moves that the computer will look ahead.
    Yeah my job in my group for my class project is to develop "easy" mode AI and I figured doing something with only present-configuration gameplay but we agreed medium and hard mode will do like you suggested: deeper levels of foresight. Our teachers assisstant lectured on alpha-beta pruning but I'm weak when working with trees. Thanks again!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •