The A.I. thread

You may also want to check out the Turing Test

Ooooooooh. Philosophy of the Mind, here we go again. I remember about writing a paper on the whole "Ghost in the machine" issue during my second year. Was actually quite interesting. Now that I think about it, ALICE was also mentioned somewhere in one of my lectures. How long has ALICE been around for? :confused:
 
and I wanna see this ADT stuff implemented you guys claim I need, because I previously thought ADT was a security company:rolleyes::D
 
Ooooooooh. Philosophy of the Mind, here we go again. I remember about writing a paper on the whole "Ghost in the machine" issue during my second year. Was actually quite interesting. Now that I think about it, ALICE was also mentioned somewhere in one of my lectures. How long has ALICE been around for? :confused:

I first saw ALICE around 9 years ago now, it was called WinAlice back then, so a while...
 
so you guys ask me whether or not I can make this "neural network", and whether I can implement "ADT" and whatnot but when I ask you guys to do it then you both go silent?

go figure.... :rolleyes:
 
so you guys ask me whether or not I can make this "neural network", and whether I can implement "ADT" and whatnot but when I ask you guys to do it then you both go silent?

go figure.... :rolleyes:

/Cheers on Keeper :p

Anyway, did you see my post on Neural Networks?
 
/Cheers on Keeper :p

Anyway, did you see my post on Neural Networks?

Sacha Barber writes brilliant articles, I've used some of his stuff before

Keeper said:
so you guys ask me whether or not I can make this "neural network", and whether I can implement "ADT" and whatnot but when I ask you guys to do it then you both go silent?

go figure....

If I get a gap over the weekend I'll whip up a simple binary tree decision type thingy for you...

EDIT: In C# btw...
 
yes, and it was confusing to say the least.

how the heck do I decipher this one:

m
ÎŁbias+(W^i X^i)
i=1

:confused:

i'll be building a "garden rocket" that works with water - linking me to the formulae for jet-fuel isn't gonna help me :D :D
 
Last edited:
yes, and it was confusing to say the least.

how the heck do I decipher this one:

m
ÎŁbias+(W^i X^i)
i=1

:confused:

That formula is used as the activation function of a AN (Artificial Neuron). For a given neuron there are i inputs each with i weights associated to that input. In order to determine if the neuron will fire or not you take the Input Xi (i being the i-th input) * the weight of that input Wi (i-th weight). Also the activation function you posted has a bias which, as the name implies adds a bias to the neuron. Personally I don't like the bias because in my experience the NN had to be over trained or it wouldn't behave as expected.

If you interested to learn NN's I suggest you use google & wikipedia to learn how to create your OWN basic NN.

Start with a simple Perceptron that uses the Step Activation function. At Tuks we had to create a Feedforward Neural Network that uses stochastic learning in order to identify if a given sentence of any length is Afrikaans or English as one of the practicals It's was a good learning experience.

I'd suggest to try it by creating Feedforward Neural Network that uses stochastic learning and the Sigmoid Activation function that determines if a sentence is one language or another and train it on text you can find on the internet.

After that change your NN to use a Genetic Algorithm (GA) to enhance it's capability.

We did a practical program that used a Game Tree another on NN and the last on a GA, it was interesting but in all honesty I don't see myself using it much.

It's not really rocket science just a advanced data structure & algorithm imho.
 
I was programmed to prove that people could fail at the turing test

all your base are belong to me
 
Anyone here interested in neural networks? C'mon, where's all the CompSci guys? sn3rd? semaphore?

I've tried my hand at proper AI development and subsequently gave up... :p I'll stick to web development for the time being, whilst dabbling in a bit of graphic engine design using XNA. :p Also, "training" your AI engine to handle most circumstances to the degree you desire it to is a bit of a chore for me. I prefer instant results.

Hehe...

Thanks for the honourable mention :)

I've just been so bogged down with work the last few weeks. Next time I get 5mins alone with my PC, I'll upload some stuff.

I have a genetic algorithm designed to illustrate the process, and a few others with some nice tweaks.

At Keeper:

What you said sounds more static, than "intelligent". The idea is not to have a variable to control this or that because that would make it deterministic. Instead, you want the program to have no knowledge of the application, and yet acts accordingly.

I'm a big fan of intelligent computing :)
 
Wow, just read the thread. Some badass arguments brewing! But I agree about getting things on track...

Once again, Gnome is correct in what he says. The best way to figure it out is to try it for yourself. And neural networks aren't, perfect for EVERY situation. Nor are evolutionary algorithms, or even classical techniques. There ain't no free lunch.

Artificial intelligence immediately begs the question of what "intelligence" actually is. Is it acting "humanlike"? Because humans do lots of suboptimal things that are generally not considered intelligent. If "doing the correct thing" is your measure of intelligence, then the question becomes "what is the correct thing?".

Ultimately, the field of artificial intelligence, as it is colloquially used, encompasses parts of many very different fields such as philosophy, mathematics (and LOTS of it), signal processing, software engineering etc.

I think that's why I like it so much; it has such a diverse scope! And you can never be "good" at it; merely adequate.

Anyway, that's my R0.02 for now. Back to work :(

Keep it up! I'm keen to see what you all come up with, and also provide what I've done in the past :)
 
I have already started my planning of the way the AI would work, and so far have the basic structure.

picture.php


actual coding to start soon....
 
Wrote an implementation of the Animal Guessing Game using a Generic Binary Tree in C#.

You can get the executable here
And the source code here

It's a really basic implementation, and the some of the code is a bit dodgy, so don't expect much I wrote it while watching the cricket today :p
 
I have already started my planning of the way the AI would work, and so far have the basic structure.

picture.php


actual coding to start soon....

Not to be pedantic, and certainly NOT to create an argument, but...

Flow charts should use diamond boxes for decisions ;)
 
Ok, here's something quick to get the ball rolling on the evolutionary algorithm front:

Code:
#include <stdio.h>
#include <cstdlib>
#include <math.h>
#include <iostream>
#include <string>

#define POPULATION_SIZE 10000
#define CROSSOVER_RATE 0.8
#define MUTATION_RATE 0.0

using namespace std;

void recombine(string* parent1, string* parent2, string* child1, string* child2)
{
	(*child1) = (*parent1);
	(*child2) = (*parent2);
	double randomResult;
	
	randomResult = (rand() % 10) / 10;
	if (randomResult < CROSSOVER_RATE)
	{
		char tempChar = 0;
		int recombineLocus = (rand() % (*parent1).length());
		for ( int i = recombineLocus ; i < (*parent1).length() ; i++ )
		{
			tempChar = (*child1)[i];
			(*child1)[i] = (*child2)[i];
			(*child2)[i] = tempChar;
		}
	}
	randomResult = (rand() % 10) / 10;
	if (randomResult < MUTATION_RATE * 2)
	{
		for ( int i = 0 ; i < (*parent1).length() ; i++ )
		{
			randomResult = (rand() % 10) / 10;
			if (randomResult < (MUTATION_RATE * 2)/2)
			{
				(*child1)[i] = ((char)(48 + (rand() % 75)));
				break;
			}
			if (randomResult < (MUTATION_RATE * 2) && randomResult > (MUTATION_RATE * 2)/2)
			{
				(*child1)[i] = ((char)(48 + (rand() % 75)));
				break;
			}
		}
	}
	randomResult = (rand() % 10) / 10;
	if (randomResult < MUTATION_RATE * 2)
	{
		for ( int i = 0 ; i < (*parent1).length() ; i++ )
		{
			randomResult = (rand() % 10) / 10;
			if (randomResult < (MUTATION_RATE * 2)/2)
			{
				(*child2)[i] = ((char)(48 + (rand() % 75)));
				break;
			}
			if (randomResult < (MUTATION_RATE * 2) && randomResult > (MUTATION_RATE * 2)/2)
			{
				(*child2)[i] = ((char)(48 + (rand() % 75)));
				break;
			}
		}
	}
}

int main(int argc, char* argv[])
{
	if (argc != 2)
	{
		cout << "Usage: " << argv[0] << " <solution>" << endl;
		return 1;
	}
	string solution(argv[1]);
	
	string temporary("");
	string population[POPULATION_SIZE];
	
	int fitness[POPULATION_SIZE];
	
	for ( int i = 0 ; i < POPULATION_SIZE ; i++ )
	{
		temporary.erase(0);
		for ( int j = 0 ; j < solution.length() ; j++ )
		{
			temporary = temporary + ((char)(48 + (rand() % 75)));
		}
		population[i] = temporary;
	}
	
	int generation = 1;
	while (true)
	{
		for ( int i = 0 ; i < POPULATION_SIZE ; i++ )
		{
			fitness[i] = 0;
		
			for ( int j = 0 ; j < solution.length() ; j++ )
			{
				fitness[i] = fitness[i] + abs(solution.c_str()[j] - population[i].c_str()[j]);
			}
		}
	
		for ( int i = 0 ; i < POPULATION_SIZE - 1 ; i++ )
		{
			for ( int j = i ; j < POPULATION_SIZE ; j++ )
			{
				if (fitness[i] < fitness[j])
				{
					int tempFitness = fitness[j];
					fitness[j] = fitness[i];
					fitness[i] = tempFitness;
				
					string tempIndividual = population[j];
					population[j] = population[i];
					population[i] = tempIndividual;
				}
			}
		}
	
		for ( int i = 0 ; i < POPULATION_SIZE - 1 ; i++ )
		{
			recombine(&population[POPULATION_SIZE - i - 1], &population[POPULATION_SIZE - i - 2], &population[i], &population[i+1]);
		}
		cout << generation++ << " " << population[0] << " " << fitness[POPULATION_SIZE-1] << endl;
		if (population[0] == solution)
		{
			break;
		}
	}
	
	return 0;
}

Tried to make it as readable as possible (without comments, so you're forced to actually see what it's doing, haha).

Oh, and it's here because I didn't have anywhere to upload :p
 
that's almost like the "life" game isn't it?

diamond boxes - right. thank you.

edit: but to be frank, it doesn't matter - I know what they mean, and that's all that matters.
 
that's pretty cool - i like it! did you code it in one day?:confused:

Thanks, I did a really basic implementation, it's more to demonstrate the use of a decision tree. It's not the first time I've written something like that so it didn't take very long :p

You should maybe look up heaps, so you can get an idea of how to store tree structures in arrays, maybe it'll help you.

sn3rd said:
Tried to make it as readable as possible (without comments, so you're forced to actually see what it's doing, haha).

Oh, and it's here because I didn't have anywhere to upload

Check out 4shared you can sign in with a Google account/Open ID and get 5gig free storage.

Your code looks pretty sweet, when I was at Varsity all we did in AI was Prolog
 
Top
Sign up to the MyBroadband newsletter
X