How to maximize the score when computer plays a game

This is a discussion on How to maximize the score when computer plays a game within the Game Programming forums, part of the General Programming Boards category; I wrote the text version of a game called Virus 3, which can be found here: http://www.arcadetown.com/virus3/gameonline.asp The only differences ...

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    1

    How to maximize the score when computer plays a game

    I wrote the text version of a game called Virus 3, which can be found here: http://www.arcadetown.com/virus3/gameonline.asp

    The only differences are: the colours are indicated by numbers, the board is rectangular, and there is no limitation as to the # of moves (there is no "game over"). Also, unlike the online game, the score will be calculated by summing the square of the number of new tiles on the virus.

    I want to find a way to maximize the score when the computer plays the game. Would you care to give me some ideas?
    Last edited by banafsh3h; 03-29-2008 at 07:23 PM. Reason: forgot to mention something

  2. #2
    Registered User guesst's Avatar
    Join Date
    Feb 2008
    Location
    Lehi, UT
    Posts
    179
    Quote Originally Posted by banafsh3h View Post
    I wrote the text version of a game called Virus 3, which can be found here: http://www.arcadetown.com/virus3/gameonline.asp

    The only differences are: the colours are indicated by numbers, the board is rectangular, and there is no limitation as to the # of moves (there is no "game over"). Also, unlike the online game, the score will be calculated by summing the square of the number of new tiles on the virus.

    I want to find a way to maximize the score when the computer plays the game. Would you care to give me some ideas?
    Well, this is just a thought, and I'm no good at this sort of thing, but the answer to me would be to have the computer actually play the game, being sure to remember each step of the way. It could simply brute force the game until it wins playing the lowest possible number, and if the lowest possible number doesn't change the board then backtrack (undo) and eliminate that number. If it wins, and that sequence resulted in the fewest moves remember the sequence and tag with the number of moves, then backtrack. Keep going this way until every possible combination has been played.

    The other possibility is to simply play each move one at a time and pick the possibility that maximizes THIS move. Easier to program, not as likely to maximize the score.
    Type-ins are back! Visit Cymon's Games at http://www.cymonsgames.com for a new game every week!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. trouble with creating a loop to read certain number of inputs
    By import tuner650 in forum C++ Programming
    Replies: 2
    Last Post: 03-20-2008, 08:28 PM
  2. 2D RPG Online Game Project. 30% Complete. To be released and marketed.
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 10-28-2006, 01:48 AM
  3. Game Designer vs Game Programmer
    By the dead tree in forum Game Programming
    Replies: 8
    Last Post: 04-28-2005, 10:17 PM
  4. My Memory Game
    By jazy921 in forum C Programming
    Replies: 0
    Last Post: 05-05-2003, 06:13 PM
  5. Warlords the computer game
    By Garfield in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 10-18-2001, 07:53 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21