게임 속 AI 의 주된 역할 1

Download Report

Transcript 게임 속 AI 의 주된 역할 1

AI… in Game
기계항공공학부
장 유민
바둑 (baduk) 프로그램은 인간의 게임에서 나타나는 지능적 메카니즘에 대한 이해에서의 약
점을 그대로 보여준다. 바둑 프로그램은 상당한 노력에도 불구하고 (chess 만큼의 노력은 아니
지만) 아직 실력이 매우 낮다. 바둑에서의 하나의 돌의 위치 (position) 은 수 많은 하위 위치
(subposition) 으로 나눠지는데, 각 subposition 은 상호 작용의 분석에 의하여 다른
subposition 에 영향을 미친다.....이러한 지능적 메카니즘의 부족을 수천 수백만 번의 계산을
수행하여 보상하게 된다(Deep Blue에서 처럼...). 멀지 않아 AI 연구자들은 이러한 치명적인 약
점을 극복할 것이다 .....
러시아 AI 연구자인 Alexander Kronrod 가 말하기를 "체스는 AI 의 초파리이다" 라고 하였다.
유전학자가 초파리로 다양한 실험을 하듯이 AI 연구자는 체스 (chess)를 연구 대상으로 한다는
의미다. 체스 프로그램은 현재 상급 선수 수준이지만 인간과 비교했을 때는 제한된 지능
(Intelligence) 메카니즘만을 가진다. 왜냐하면 이해 (Understanding)를 해야 할 것을 많은 양의
계산으로 대신하기 때문이다. 세계 챔피언을 깨기 위해서는 초당 2억 개의 돌의 위치를 파악
할 수 있는 능력과 믿을 만한 휴리스틱 (Heuristic)을 필요로 한다. 일단 이러한 메카니즘을 더
잘 이해하면 우리는 현재의 프로그램이 하는 것보다 훨씬 더 적은 계산을 하고서도 인간수준
의 프로그램을 만들 수 있을 것이다.....
www.aistudy.com/game/game.htm
Heuristic 은 그리스어 "heutiskein" 가 어원이며 "to discover" 라는 의미를 가진다. 즉
이미 정립된 공식에 의해서가 아니라, 정보가 완전하지 않은 상황에서 노력을 통해서
시행착오 (trial and error) 를 거처, 또는 경험을 통해서 주먹구구식의 규칙 (Rule of
Thumb) 을 통해 지식을 알게되는 과정을 의미한다. 잘 추측하는 기술 (art of good
guessing) 이라고 표현하기도 한다
알고리즘 (Algorithm) 과는 달리 heuristic 은 해결책의 발견을 보장하지 않는다. 그러
나 heuristic 은 알고리즘보다 효율적이다. 왜냐하면 많은 쓸모 없는 대안책들을 실제
시도하지 않고도 배제시킬 수 있기 때문이다. 순회외판원 문제 (Traveling Salesman
Problem), 체스 (Chess) 에서처럼 알고리즘은 극도의 비효율성을 보여주어 사실상 문
제해결 (Problem Solving) 이 불가능해진다.
www.aistudy.com/game/game.htm
체스 컴퓨터는 인간 상대방에게 우세를 점할 때가 가끔 있는 반면, 바둑이나 브리지 같은
다른 게임에서 컴퓨터 선수들은 비교적 열세에 놓여 있다. 컴퓨터는 체커나 오셀로 게임에
서 몇 년째 세계 최고의 선수 자리를 유지하고 있다. 컴퓨터는 체스처럼 백개먼에서도 막상
막하인 반면, 스크래블에서는 약간 우세에 있다. ...... 컴퓨터의 계산 (Computation) 능력이
인간을 훨씬 능가하는데도, 인간이 컴퓨터를 이길 수 있는 이유는 무엇일까? ........ 게임 소
프트웨어는 인공 지능의 한 요소로서 기계의 막무가내 계산과 인간의 직관적인 패턴 맞추기
능력 사이의 핵심적인 차이점을 드러낸다 .......인간은 패턴 맞추기 (Pattern Matching) 라는
과정을 통해 최상의 수를 찾아낸다. 패턴 맞추기는 병렬 처리이다 ....... 반면 탐색
(Search) 은 본질적으로 병렬 처리가 아니다 ...... 최소한 가까운 미래까지는 병렬적 문제해결
(Problem Solving) 에는 기계보다 인간이 나을 것이고, 기계는 순차적 문제 해결에서 더 뛰
어날 것이다 .......
(Matthew Ginsberg 1998)
www.aistudy.com/game/game.htm
게임 속 AI 의 주된 역할 1
NPC(None-player Character)
논플레이어 캐릭터(non-player character, NPC)는 게임에서 사람이 직접 조작하지 않는 캐릭
터를 말한다. 원래는 테이블 롤플레잉 게임에서 비롯된 용어로 컴퓨터 롤플레잉 게임에서도
사용되며, 종종 다른 장르의 컴퓨터·비디오 게임에서도 사용된다.
Pathfinding
generally refers to the plotting, by a computer application, of the shortest rout
e between two points. It is a more practical variant on solving mazes. This fiel
d of research is based heavily on Dijkstra's algorithm for finding the shortest p
ath on a weighted graph .
Beyond pathfinding, navigation is a sub-field of Game AI focusing on giving NPCs th
e capability to navigate in their environment, finding a path to a target while avoiding
collisions with other entities (other NPC, players...) or collaborating with them (group n
avigation). Game AI is also involved with dynamic game difficulty balancing , which c
onsists in adjusting the difficulty in a video game in real-time based on the player's ab
ility.
게임 속 AI 의 주된 역할 2
The concept of emergent AI has recently been explored in games such as Creature
s , Black & White and Nintendogs and toys such as Tamagotchi . The "pets" in thes
e games are able to "learn" from actions taken by the player and their behavior is
modified accordingly. While these choices are taken from a limited pool, it does often
give the desired illusion of an intelligence on the other side of the screen.
Artificial intelligence (video games)
Purists complain that the "AI" in the term "game AI" overstates its worth, as game AI is not abou
t intelligence , and shares few of the objectives of the academic field of AI. Whereas "real" AI add
resses fields of machine learning, decision making based on arbitrary data input, and even the ult
imate goal of strong AI that can reason, "game AI" often consists of a half-dozen rules of thumb,
or heuristics , that are just enough to give a good gameplay experience. [ citation needed ]
Game developers' increasing awareness of academic AI and a growing interest in computer game
s by the academic community is causing the definition of what counts as AI in a game to becom
e less idiosyncratic . Nevertheless, significant differences between different application domains o
f AI mean that game AI can still be viewed as a distinct subfield of AI. In particular, the ability to l
egitimately solve some AI problems in games by cheating creates an important distinction. For e
xample, inferring the position of an unseen object from past observations can be a difficult probl
em when AI is applied to robotics, but in a computer game an NPC can simply look up the positi
on in the game's scene graph . Such cheating can lead to unrealistic behavior and so is not alway
s desirable. But its possibility serves to distinguish game AI and leads to new problems to solve,
such as when and how to use cheating. [ citation needed]
The major limitation to strong AI is
the inherent depth of thinking
and
the extrem
e complexity of the decision making process. This means that although it would be then the
oretically possible to make "smart" AI the problem would take considerable processing power.
http://en.wikipedia.org/wiki/Artificial_intelligence_(vide
o_games)
Black & White
Dynamically Building Decision Trees (다
이나믹 하게 제작된 결정 트리)라는 방식
을 이용
http://gameai.net/Article/CurrentGameAI/Curre
ntGameAI.htm
The Sims
EA에서 내놓은 시뮬레이션 장르의 게임이다. Sim City시리즈로 유명한 Will Write
가 심혈을 기울여 만든 게임이다. 우리의 실생활을 게임에 재미있게 옮겨놓았는데
각 Character의 욕구가 있어서 그것들을 잘 충족시켜 주어야지 Game Play를 순조
롭게 할 수 있다. Sims 에서
특징적인 것은 캐릭터의 욕구에 기반한 AI기법이 사용된 것과 어떤 행동에 대
한 정보들을 각각의 오브젝트가 가지고 있는 방식이 독특하다. 욕구 기반의 AI 기법
은 Gamasutra에도 소개되었지만 내부상태에 대한 욕구한계점(threshold)을 조절해
서 적절한 효과를 얻을 수 있는 방식으로서 생물의 행동과 유사하도록 그 한계점들
을 적절히 조절하면서 적용했다.
http://gameai.net/Article/CurrentGameAI/Curre
ntGameAI.htm
Half Life
Half Life는 게임 중에서도 명작으로 꼽히는 게임이다. 이 게임은
무엇보다 스토리와 연출로 플레이어들을 사로잡았다. 이 게임 또한
AI가 Game에 재미를 더해 주고 있는데 몬스터나 특수부대원들이
나올 때면 정말 만만한 상대들이 아니다라는 느낌을 받을 수 있는
데 그 들의 움직임 또한 모두 AI로 처리되었다.
Half Life에서 적용한 방식은 일련의 행동들을 Schedule로 묶어서
처리한 방식인데, 이것은 HFSM(Hierarchy Finite State Machine)
이란 방법으로 볼 수 있는데 FSM을 개념에 따라 계층을 나누어 놓
았다고 볼 수 있다. 하나 하나의 구체적인 행동들을 Task State라고
하면 그 task들이 여러 개 모여있는 State가 Schedule State인 것이
다.
여기서 간단하게 State Machine이란 개념을 소개하자면 State들
을 어떤 조건에 따라 연결해 놓은 것이다. 각각의 State에는 여러
가지가 들어갈 수 있다. 캐릭터의 내부상태가 될 수도 있고 행동
패턴이 될 수도 있고 심리 상태가 될 수도 있다. 이런 각각의 State
들이 어떤 조건에 따라 연결되어 있는 것이 State Machine 이다.
http://gameai.net/Article/CurrentGameAI/Curre
ntGameAI.htm
Creature
이 게임에서의 AI는 흉내내기를 넘어서서 모델링 수준에 가깝다고 할 수 있다. 이 게임에
서는 생물을 모델링하기 위한 갖가지 AI Algorithm들을 사용하고 있는데, 일단 이 게임
에서는 Character들 간에 교배도 가능하다는 점이 가장 흥미롭다. 특히 이 교배라는 것을
구현하기 위해 Genetic Algorithm(유전자 알고리즘)을 사용했는데 여기서
Character의 여러 가지 특징들을 gene(유전자)에 저장하고 이 정보들을 Genetic
Algorithm을 이용해 교배할 때 적절히 섞어줌으로써 실제 생물에서 볼 수 있는 교배의
효과를 구현했다.
이 게임은 앞에서도 얘기했듯이 생물을 구현하려고 노력했다. 개발자에 따르면 교육적
효과도 기대하면서 제작했다고 한다. 충분히 그럴 것이 캐릭터들은 내부에 갖가지 욕구
와 질병, 영양소(비타민 등)을 가지고 있고 그것에 따라 여러 가지 반응들을 나타낸다.
그리고 크리쳐가 사고 판단할 때 인간의 뇌를 흉내 낸 Neural Net Algorithm을 간단하
게 적용했는데 이 또한 굉장하게 느껴진다. Neural Net(신경망 이론)은 인간의 뇌의 학
습, 추론 원리를 흉내 낸 알고리즘으로서 실제 학계에서는 패턴인식에 주로 사용하고 있
다.
http://gameai.net/Article/CurrentGameAI/Curre
ntGameAI.htm