Computer Chess Club Archives


Search

Terms

Messages

Subject: What is a game engine?

Author: Russell Reagan

Date: 00:12:10 04/27/02


I'm thinking more in the generic sense of what a game engine is. I've been
trying to dig in deeper and have a good overall understanding of what goes into
a game "engine". You hear about chess engines, 3D engines, search engines, etc.
but to the casual user a chess engine and a chess program are the same thing.

What I'm dealing with in my mind is more of a general understanding of what
components of an engine are in development of an end program. My net searches
have turned up a lot of articles on how to create specific kinds of engines
(mostly 3D stuff). I've tried to develop some general component lists that go
into the engine and I've got a general idea, but it's not yet to the level of
understanding that I can apply it for some practical results in making my chess
engine more organized and structured, and allow for changes easier.

So when approaching a chess engine, what are the components? In a 3D engine,
there are some obvious things that you would need such as routines to do vector
math, routines to display bitmapped graphics, input routines, etc. In a chess
program there don't seem to be as many obvious components as these because the
bulk of the game is not generating pretty visual output for the user and
accomplishing it in real time.

One website I read said, "The actual game should never have components that are
put into the game engine...If you embed any of your game logic in the engine
itself, don't plan on reusing it later without lots of problems and
modifications." Does this mean that you shouldn't embed any chess specific
things into your chess engine? That the "engine" here should be a more general
game playing engine that you could use for writing a checkers program just as
well as a chess program? For a 3D engine this makes perfect sense. You have all
of the tools you need to generate a 3D game, and you can wrap them up in an
external library like a DLL and use it for many 3D games that you make. Does
this concept of not including any game specific stuff apply to a chess engine?

It also helped to think of a game engine as a car. You can start a car engine
(initialization), change various settings (forward, reverse, neutral), and have
main user inputs to the engine such as the accelerator foot pedal and steering
wheel. From reading about and looking over various 3D engine's documentation I
formed the idea that an engine's purpose is to generate or produce some desired
result from the user's input. A car's engine has the goal of producing efficient
travel and the user can set various settings (forward or reverse) and send
inputs to the engine such as pressing the gas pedal, and acheive the goal of
traveling more efficiently than having to walk or ride a bike. A 3D engine
produces a real time visual representation of a virtual world. A chess engine
produces optimal moves for chess positions. These are all goals of course and
are only attempts at acheiving these goals.

So I'm really trying to figure this whole concept out and break it down into
it's components and understand it. I want to be able to know where to start when
building an engine first off. For example, is an engine's purpose to produce a
desired result? If so, then I could start with that and try to figure out what
the desired result is in my chess program. Also the concept of the engine
containing no game specific information seems a little more difficult to me to
apply to chess. Some things like algorithms could be implemented with no game
specific data like alpha-beta, but it seems hard to write a MakeMove() function
without knowing anything specific to the game of chess. It seems like a
MakeMove() function would be part of the "engine", but not according to the "no
game specifics in the engine" philosophy. I've struggled with this for quite a
while, trying to organize different parts of my program and then I think "this
doesn't belong here, it belonds over here in this file" and then I change my
mind again and again and end up making a mess of the whole thing, get tired of
fibrillating on the same thing, then I try to rush it because I'm sick of
spending so much time of non-chess stuff like getting the "interface" module
working, so inevitably since I rushed it, it has bugs and doesn't work right, so
I just scrap the whole thing and start over eventually, and end up accomplishing
nothing.

So I'm all ears. Guide me :)

Russell



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.