×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    6

    Question 5 in a row Tic Tac Toe

    Hi

    I have to do 5 in a row Tic Tac Toe
    for different board sizes like 5*5, 10*10, 15*15, for 3 different levels(easy,
    medium, hard) Can anyone tell me how to start of with?
    As i am new to AI, how to differentiate btn levels in AI n the algorithm to be used?

  2. #2
    Super Contributor
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: 5 in a row Tic Tac Toe

    basically on a phone, the main issue with AI will be computation speed, and for a 15*15 you'll probably have to reduce the AI
    the main idea is to check the possibilities of play for the AI, give a mark to each one according to how good is the position for the AI player, and choose the best (and may be introduce some random to make it easier for the human player)
    so the problematic is to find the good 'heuristic' or method of evaluation
    the probleme in term of time is that if, for example, you evaluate the position at 3 in advance (do you may find a solution which is not immediately good, but leads to a better position), you need to compute 15*15*(15*15 - 1)*(15*15 - 2) at the first one, which is ~ 10^7 evaluations ...

    concerning the graphics, see GameCanvas and Sprite

  3. #3
    Regular Contributor
    Join Date
    Jan 2005
    Location
    France, Paris
    Posts
    56

    Re: 5 in a row Tic Tac Toe

    About the algorithm, you should check the "alpha beta" algorithm (-> google). It's the simplest algorithm for this kind of games. And I agree njzk2, it will be slow on most of j2me phones ^^;

Similar Threads

  1. Replies: 4
    Last Post: 2008-06-13, 18:33
  2. Tic Tac Toe for Nokia 6310i Released!
    By brilleaben in forum Mobile Java General
    Replies: 2
    Last Post: 2007-12-29, 07:09
  3. Replies: 5
    Last Post: 2005-10-18, 06:23
  4. IMEI TAC code handset identification
    By gurth in forum General Development Questions
    Replies: 0
    Last Post: 2004-04-19, 12:04
  5. How to change the row height in column listbox?
    By khanming in forum Symbian User Interface
    Replies: 3
    Last Post: 2003-03-11, 12:49

Posting Permissions

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