Results 1 to 4 of 4

Thread: AI learns to play Civlization 2 from the manual

  1. #1
    Heraclitus
    Emperor Heraclitus's Avatar
    Join Date
    27 Sep 2007
    Location
    Slovenia
    Posts
    8,337
    Country
    This is Heraclitus's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 19, 2013
    Local Time
    09:13

    AI learns to play Civlization 2 from the manual

    MIT news

    Computers are great at treating words as data: Word-processing programs let you rearrange and format text however you like, and search engines can quickly find a word anywhere on the Web. But what would it mean for a computer to actually understand the meaning of a sentence written in ordinary English — or French, or Urdu, or Mandarin?

    One test might be whether the computer could analyze and follow a set of instructions for an unfamiliar task. And indeed, in the last few years, researchers at MIT’s Computer Science and Artificial Intelligence Lab have begun designing machine-learning systems that do exactly that, with surprisingly good results.

    In 2009, at the annual meeting of the Association for Computational Linguistics (ACL), researchers in the lab of Regina Barzilay, associate professor of computer science and electrical engineering, took the best-paper award for a system that generated scripts for installing a piece of software on a Windows computer by reviewing instructions posted on Microsoft’s help site. At this year’s ACL meeting, Barzilay, her graduate student S. R. K. Branavan and David Silver of University College London applied a similar approach to a more complicated problem: learning to play “Civilization,” a computer game in which the player guides the development of a city into an empire across centuries of human history. When the researchers augmented a machine-learning system so that it could use a player’s manual to guide the development of a game-playing strategy, its rate of victory jumped from 46 percent to 79 percent.

    Starting from scratch

    “Games are used as a test bed for artificial-intelligence techniques simply because of their complexity,” says Branavan, who was first author on both ACL papers. “Every action that you take in the game doesn’t have a predetermined outcome, because the game or the opponent can randomly react to what you do. So you need a technique that can handle very complex scenarios that react in potentially random ways.”

    Moreover, Barzilay says, game manuals have “very open text. They don’t tell you how to win. They just give you very general advice and suggestions, and you have to figure out a lot of other things on your own.” Relative to an application like the software-installing program, Branavan explains, games are “another step closer to the real world.”

    The extraordinary thing about Barzilay and Branavan’s system is that it begins with virtually no prior knowledge about the task it’s intended to perform or the language in which the instructions are written. It has a list of actions it can take, like right-clicks or left-clicks, or moving the cursor; it has access to the information displayed on-screen; and it has some way of gauging its success, like whether the software has been installed or whether it wins the game. But it doesn’t know what actions correspond to what words in the instruction set, and it doesn’t know what the objects in the game world represent.

    So initially, its behavior is almost totally random. But as it takes various actions, different words appear on screen, and it can look for instances of those words in the instruction set. It can also search the surrounding text for associated words, and develop hypotheses about what actions those words correspond to. Hypotheses that consistently lead to good results are given greater credence, while those that consistently lead to bad results are discarded.

    Proof of concept

    In the case of software installation, the system was able to reproduce 80 percent of the steps that a human reading the same instructions would execute. In the case of the computer game, it won 79 percent of the games it played, while a version that didn't rely on the written instructions won only 46 percent. The researchers also tested a more-sophisticated machine-learning algorithm that eschewed textual input but used additional techniques to improve its performance. Even that algorithm won only 62 percent of its games.

    “If you’d asked me beforehand if I thought we could do this yet, I’d have said no,” says Eugene Charniak, University Professor of Computer Science at Brown University. “You are building something where you have very little information about the domain, but you get clues from the domain itself.”

    Charniak points out that when the MIT researchers presented their work at the ACL meeting, some members of the audience argued that more sophisticated machine-learning systems would have performed better than the ones to which the researchers compared their system. But, Charniak adds, “it’s not completely clear to me that that’s really relevant. Who cares? The important point is that this was able to extract useful information from the manual, and that’s what we care about.”

    Most computer games as complex as “Civilization” include algorithms that allow players to play against the computer, rather than against other people; the games’ programmers have to develop the strategies for the computer to follow and write the code that executes them. Barzilay and Branavan say that, in the near term, their system could make that job much easier, automatically creating algorithms that perform better than the hand-designed ones.

    But the main purpose of the project, which was supported by the National Science Foundation, was to demonstrate that computer systems that learn the meanings of words through exploratory interaction with their environments are a promising subject for further research. And indeed, Barzilay and her students have begun to adapt their meaning-inferring algorithms to work with robotic systems.
    I was just left wondering how well it would have done if they had given it a good strategy guide.

    The paper.

    Abstract

    This paper presents a novel approach for leveraging automatically extracted textual knowledge to improve the performance of control applications such as games. Our ultimate goal is to enrich a stochastic player with highlevel guidance expressed in text. Our model jointly learns to identify text that is relevant to a given game state in addition to learning game strategies guided by the selected text. Our method operates in the Monte-Carlo search framework, and learns both text analysis and game strategies based only on environment feedback. We apply our approach to the complex strategy game Civilization II using the official game manual as the text guide. Our results show that a linguistically-informed game-playing agent significantly outperforms its language-unaware counterpart, yielding a 27% absolute improvement and winning over 78% of games when playing against the builtin AI of Civilization II.
    I hope strategy game devs are taking note here. A game AI created in this way would save developers much time and money. It seems to me that just shipping the game with such an AI, perhaps slightly modified so its not just trying to win the game but entertaining the player too, then releasing the SDK, would provide as good a result, if not better, as the current way of doing things but requiring a much smaller investment of time and money (as long as future patches and/or expansions add a few tricks the AI modders came up with or the devs stumbled upon).

    Also game testing, computers may find exploits that a small group of beta testers working on relatively short time table wouldn't (and naturally the group will find exploits and bugs the AI dosen't).

    Also:

    "The code, data and complete experimental setup for this work are available at http://groups.csail.mit.edu/rbg/code/civ ."
    Yay! It seems this seems to have a virtual machine and everything needed to actually run the experiment!
    Last edited by Heraclitus; July 14, 2011 at 04:32.
    Modern man calls walking more quickly in the same direction down the same road “change.”
    The world, in the last three hundred years, has not changed except in that sense.
    The simple suggestion of a true change scandalizes and terrifies modern man. -Nicolás Gómez Dávila

  2. #2
    daistar
    Settler
    Join Date
    18 Jul 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 19, 2013
    Local Time
    03:13
    wow, interesting

  3. #3
    OzzyKP
    ACS Staff Member OzzyKP's Avatar
    Join Date
    11 Oct 1999
    Location
    Rockville, MD
    Posts
    13,612
    Country
    This is OzzyKP's Country Flag
    Thanks
    20
    Thanked 7 Times in 5 Posts
    Blog Entries
    1
    Local Date
    May 19, 2013
    Local Time
    04:13
    Very cool stuff.
    Captain of Team Apolyton - ISDG 2012

    When I was younger I thought curfews were silly, but now as the daughter of a young woman, I appreciate them. - Rah

  4. #4
    robinp
    Chieftain
    Join Date
    21 Jul 2002
    Location
    Porirua City
    Posts
    35
    Country
    This is robinp's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Blog Entries
    3
    Local Date
    May 19, 2013
    Local Time
    20:13
    C-evo already invites outsiders to create alternative AIs and slot them in, offering the workable ones as options on its website. It offers AI development kits to help.
    [Mr] Robin F Patterson

Similar Threads

  1. Old dog learns new tricks, or MP warfare in the Nuclear Age
    By Theben in forum Civilization IV General
    Replies: 92
    Last Post: January 4, 2010, 13:45
  2. Replies: 4
    Last Post: February 27, 2003, 14:26
  3. Replies: 3
    Last Post: July 14, 2002, 00:33
  4. The AI learns to use Mods
    By Bubba_B in forum Civ3-General-Archive
    Replies: 9
    Last Post: November 21, 2001, 16:52
  5. 1995 CivNet manual on SIMUL PLAY :)
    By deity in forum Civ2-Multiplaying-Archive
    Replies: 3
    Last Post: December 23, 2000, 02:15

Visitors found this page by searching for:

powered by vBulletin words

powered by vBulletin civilization

powered by vBulletin science experiment kits

powered by vBulletin school science experiments

powered by vBulletin simple science projects

powered by vBulletin computer systems

powered by vBulletin learn to play

powered by vBulletin play

powered by vBulletin play arcade games online

powered by vBulletin school science labs

civilization 2 AI

powered by vBulletin home science experimentpowered by vBulletin computer sciencepowered by vBulletin best board gamespowered by vBulletin history of computer sciencepowered by vBulletin play game win moneypowered by vBulletin computer historypowered by vBulletin small group softwarepowered by vBulletin electrical codepowered by vBulletin easy science projectpowered by vBulletin science projectspowered by vBulletin 80s arcade gamespowered by vBulletin free play scriptstep by step video of how to play civilization 2 controlspowered by vBulletin video game tester jobs

Bookmarks

Posting Permissions