Tag Archives: programming

Dark side of programming, hard coding, it’s more code now than game

The definition of a DSL, the applicability of DSLs to AI in particular, the practical side of constructing and deploying DSLs for AI, and the benefits (and beneficiaries) of DSLs for AI. Lastly, we will conclude with some advice from hard experience on the subject.

A Domain-Specific Language is mere a language designed to be highly adept at solving a specific class of problems. Some languages are more specialized than others, some languages are designed to execute in certain environments and some languages are intended to be as widely applicable as possible

The first major principle that motivates our application of DSLs is code cleanliness and the effects of mapping code directly into the problem space (versus code which is too generalized, too abstract, or too specific – i.e. “hard coded”). The second major principle that motivates DSL deployment is elimination of irrelevant concerns. Our third motivating principle: removing excess overhead.

Scripts were developed in the early AI work by Roger Schank, Robert P. Abelson and their research group as a method of representing procedural knowledge. They are very much like frames, only the values that fill the slots must be ordered. A script is a structured representation describing a stereotyped sequence of events in a particular context. Scripts are used in natural language understanding systems to organize a knowledge base in terms of the situations that the system should understand.

The classic example of a script involves the typical sequence of events that occur when a person drinks in a restaurant: finding a seat, reading the menu, ordering drinks from the waitstaff. In the script form, these would be decomposed into conceptual transitions, such as MTRANS and PTRANS, which refer to mental transitions [of information] and physical transitions.

Schank, Abelson and their colleagues tackled some of the most difficult problems in artificial intelligence (i.e., story understanding), but ultimately their line of work ended without tangible success. This type of work received little attention after the 1980s, but it is very influential in later knowledge representation techniques, such as case-based reasoning.

Scripts can be inflexible. To deal with inflexibility, smaller modules called memory organization packets (MOP) can be combined in a way that is appropriate for the situation. The behavior design is the roadmap for our AI scripting, giving us a clear set of coding elements to complete before it’s AI takes shape.

Although there are many different methods of designing AI, including sophisticated methods such as neural networks and artificial evolution, with a simple creature like this, our tutorial will follow the most basic and standard method used by all stock Unreal AI; conditional decision-making. This is the method that takes stimuli as a constant condition or trigger to either do this or that; also known as “if this, then do that”, or “if-then” decision-making. A common example of this kind of AI is the AI Script in a Scripted Sequence, but even Bots use this method, just in an extremely complex form.

We have some features of our NPC already defined for us; its model, textures, animation and sounds. Normally, a custom character would be started by defining its purpose or goal and then design those features around it. But for this behavior design, we will work “backwards”; starting with those features and finding the purpose and behavior design that fits it.

These are misconceptions about DSL development. DSLs are, by definition, simple and to the point. They eliminate the bulk of the issues that plague generic languages and require far less infrastructure to deploy effectively. Additionally, they require much less up-front design and development work.

Programmers in general are lazy and often try to find the simplest approach. This is isn’t necessarily a vice, after all, technology is a means to maximize efficiency by decreasing the energy and time required to do something. This is a god send for game developers as better technology can enable them to produce the best software and interface possible in shorter time spans given how higher ups give them specific deadlines. Scripts are ideal because of their flexibility, that way programmers can make necessary changes in time, with hard code it would be near impossible.


A Change of Pace: Back Alley Brawl

“This bear comes out of nowhere and then slaps us around like we’re his hoes.” – Stan Burdman, professional reviewer


It’s easy to comment and blog about professional games with well made mechanics and competent programming. So lets pick on a lousy PC game by the name of Back Alley Brawl, an incompetently made fighting game that’s available to download for free as no-one would pay for this, they wouldn’t even accept payment to play this.

Given the hot topic of my Game Engine’s class this week is A.I., Back Alley Brawl is an example of how NOT to design opponent A.I., one of the most important components of a fighting is challenge, it’s important that your opponent can fight at your level to keep the game interesting. The programmers of the A.I. in this game are the equivalent of a parents who lets their child wander all around the place. While you’re fighting, your opponent will walk around aimlessly and even keep walking into a wall. Someone hasn’t heard of the A* algorithm.


Not sure if complete moron or training like the protagonist from Turkish Star Wars.

I apologize for comparing the opponent’s A.I to a child, even a child knows not to walk into a wall. I remember my Introduction to Programming professor Amin Ibrahim commenting on the first day how a child will learn to not put its hand on fire after getting hurt once, while a program or machine won’t learn unless its code tells it otherwise. The first rule of coding, broken by people would can develop a functional game.


Where’s the playability? WHERE IS IT?

It’s quite the far cry from Namco Bandai’s Dragoball Z and Naruto games where the characters are always in a state of facing each other; all their movements are based on a grid with the camera managing to keep both players on the screen and opponent A.I. that doesn’t go wandering around. Though it helps that those games were programmed by decent human beings, rather than which ever chimp programmed this. He even inserted himself into the roster Shyamalan style with special guest character Miley Cyrus, another reason to play Namco’s fighters, they include guest characters in Soul Caliber who’ve had GOOD games.


The reason I chose to blog about this game is because unfortunately at our level, our GDW games are closer to the quality of this game than to something like Tekken. Whereas Tekken managed to make fighting a bear a popular and plausible contest outside the Russian Federation, this game stands as proof of PC gaming’s inferiority to consoles where you can download Tekken Revoltution for free. Sorry if I keep mentioning Namco a lot in this blog, being away from home for college causes withdrawal symptoms.