Human Interest

XOR Operator

    In the last chapter, backpropagation was used to solve the XOR operator problem. In this section, you will see how a genetic algorithm, the TrainingSetNeuralGeneticAlgorithm class, can be used to train for the XOR operator. This version of the XOR solver can be seen in Listing 6.2.

Listing 6.2: XOR with a Genetic Algorithm (GeneticXOR.cs)

XOR Operator

    In the last chapter, backpropagation was used to solve the XOR operator problem. In this section, you will see how a genetic algorithm, the TrainingSetNeuralGeneticAlgorithm class, can be used to train for the XOR operator. This version of the XOR solver can be seen in Listing 6.2.

Listing 6.2: XOR with a Genetic Algorithm

Second Life Programming

    Second Life provides a scripting programming language called the Linden Scripting Language (LSL) to fill in the gaps left by Second Life's simple physics engine. Rather than simulate every aspect of a car, a programmer creates a script that tells the car how it should move. This script can play sounds, turn the car and even detect collisions. For example, to add realism, a car script could prevent the car from turning when not in motion.

Creating a Tileable Texture Using a Non-Patterned Image

    Non-patterned images are generally easier to work with than patterned images. The non-patterned image that will be used for this example is shown in Figure 3.3.

Figure 3.3: A Non-Tileable, Non-Patterned Image

Recipe 5.4: Super Car

    The last recipe in this chapter is a super car. The super car combines aspects from the previous three recipes. The super car can function as a car, a boat or a helicopter. By talking to the super car, the vehicle parameters can be switched out between any of the previous three vehicles. The super car looks very similar to the regular car, except that it is yellow.

    The script for the root prim of the Super Car is shown in Listing 5.8.

Listing 5.8: The Super Car (SuperCar.lsl)

Parsing HTML

    The ParseHTML class does HTML parsing. This class is used by all of the recipes in this chapter. Additionally, many recipes through the remainder of the book will use the ParseHTML class. I will begin by showing you how to use this class. In a later section, I will show you an example of a ParseHTML class implementation.

Summary

Teaser

The Traveling Salesmen Problem

Teaser

Implementing the OCR Program

Teaser

Syndicate content

Copyright 2005 - 2010 by Heaton Research, Inc.. Heaton Research™ and Encog™ are trademarks of Heaton Research. Click here for copyright and trademark information.