background preloader


Facebook Twitter

The Cryptopals Crypto Challenges. Magic: the Gathering: Twenty Years, Twenty Lessons Learned. The Nature of Code. “You can’t process me with a normal brain.” — Charlie Sheen We’re at the end of our story.

The Nature of Code

This is the last official chapter of this book (though I envision additional supplemental material for the website and perhaps new chapters in the future). We began with inanimate objects living in a world of forces and gave those objects desires, autonomy, and the ability to take action according to a system of rules. Next, we allowed those objects to live in a population and evolve over time.

Now we ask: What is each object’s decision-making process? The human brain can be described as a biological neural network—an interconnected web of neurons transmitting elaborate patterns of electrical signals. Figure 10.1 The good news is that developing engaging animated systems with code does not require scientific rigor or accuracy, as we’ve learned throughout this book. 10.1 Artificial Neural Networks: Introduction and Application Computer scientists have long been inspired by the human brain.

Show Raw. The Nature of Code. “This is an exercise in fictional science, or science fiction, if you like that better.” — Valentino Braitenberg Believe it or not, there is a purpose.

The Nature of Code

Well, at least there’s a purpose to the first five chapters of this book. We could stop right here; after all, we’ve looked at several different ways of modeling motion and simulating physics. Angry Birds, here we come! Still, let’s think for a moment. 6.1 Forces from Within The term autonomous agent generally refers to an entity that makes its own choices about how to act in its environment without any influence from a leader or global plan.

Here are three key components of autonomous agents that we’ll want to keep in mind as we build our examples. An autonomous agent has a limited ability to perceive environment. In the late 1980s, computer scientist Craig Reynolds developed algorithmic steering behaviors for animated characters. 6.2 Vehicles and Steering Show Raw Why Vehicle? Action Selection. 6.3 The Steering Force. Neat Algorithms - Flocking - Will You Harry Me. In this post I’ll explain and demonstrate an algorithm that simulates a group of entities grouping together, illustrating something called “flocking”.

Neat Algorithms - Flocking - Will You Harry Me

I think it’s quite neat because the flock exhibits some complex collective intelligence when just a few simple governing rules are applied to each entity. The original flocking algorithm was developed by Craig Reynolds in 1986, and has some super cool real world applications: Computer animation. Batman Returns (1992) is widely quoted as having been nominated for an Oscar for its bat swarms which were procedurally generated using algorithms similar to these.Social network simulation and modeling opinion flow.

After choosing humans as the entities in the flock, the overall direction of the flock can be estimated using the rules that apply to the simple flock model, and people’s future opinions can be predicted. Here’s the full algorithm in action: Understanding Steering Behaviors: Queue. Imagine a game scene where a room is crowded with AI-controlled entities.

Understanding Steering Behaviors: Queue

For some reason, they must leave the room and pass through a doorway. Instead of making them walk over each other in a chaotic flow, teach them how to politely leave while standing in line. This tutorial presents the queue steering behavior with different approaches to make a crowd move while forming rows of entities. Note: Although this tutorial is written using AS3 and Flash, you should be able to use the same techniques and concepts in almost any game development environment. You must have a basic understanding of math vectors.

Queuing, in the context of this tutorial, is the process of standing in line, forming a row of characters that are patiently waiting to arrive somewhere. In order to illustrate the queue behavior and show the different implementations, a demo featuring a "queuing scene" is the best way to go. This scene was made using two previously described behaviors: seek and collision avoidance. Using Artificial Intelligence to Write Self-Modifying/Improving Programs. This article is the first in a series of three.

Using Artificial Intelligence to Write Self-Modifying/Improving Programs

See also: Part 1, Part 2, Part 3. Introduction Is it possible for a computer program to write its own programs? Could human software developers be replaced one day by the very computers that they master? Just like the farmer, the assembly line worker, and the telephone operator, could software developers be next? "hello" The above programming code was created by an artificial intelligence program, designed to write programs with self-modifying and self-improving code. All code for the AI program is available at GitHub.


Unorganized. Language Design. Code Design. Convention/Style. Libraries. General Info. Algorithm Design. Hacks/Tips/Anecdotes.