Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > AI on C64
2009-09-29 18:25
Hermit

Registered: May 2008
Posts: 208
AI on C64

Were there any Artifical Intelligence experiments on C64?

-A neuron is not really more than a body which sums more weighted inputs into an output..(in real life sigma-sum)
-A neural network appears when these are connected to each other, in most cases by careful arrangement.
-The neurons can learn by modifying their (originally randomized) input-weights to reach the wished (reference) value at their output.
-The learning process takes some iterations depending on the strength (multiplier) of the feedback of actual error delta (wished reference for actual inputs -minus- the actual output). The optimal multiplier seems between 0.2..0.3 from my experiments.

A neuron's pins, datas (weights) and connections can be modelled in assembly easily. A byte can be a value of input-weight, and the weighted inputs can be added (and divided) together to a byte, which will represent the output of the neuron when the neuron was simulated once in a step. Then a connection list can route this output to other neuron's input.

See my example on my homepage (neuron-DAC2.xls).

http://hermitsoft.uw.hu/pcprog/pcprog.html

It's an Excel file that shows iterations and learning curve of a Neuron. We teach it to be a special Neuron - be it a DAC (Digital-to-Analog converter).
After several iterations the error gets smaller-and-smaller, then our Neuron learns to be a DAC, the needed information is 'stored' in its weights.

No concept yet, but C64 may be able to simulate simple neural networks at 1MHz, which could be useful in games, and even in demos, or who knows, even in 'random' composing for music editors..

Maybe you're interested..maybe not.
Have a good exploration.

Hermit Software Hungary
 
... 14 posts hidden. Click here to view all posts....
 
2009-10-01 12:12
Hermit

Registered: May 2008
Posts: 208
Yeah, here is a good reason to model AI with neurons: If you equip the robots with (simulated) neural networked brain, you don't have to program their behaviour, they'll realize the danger themselves on the dangerous areas after a while if their life is in danger. That is the true learning. We can say the teaching is a 'programming', but more universal and maybe easier than writing a code for every behaviour.

Just imagine: every living entity in the world was born without any knowledge, with a pure brain, with randomized weights in their neurons, clear synaptic connections. Like a formatted winchester...
There are physical circumstances, like energy, food, health, perceptions, that the entity have to keep above a level to stay alive. The nervous system & receptors are designed (maybe into DNS through evolution), but the other informations come during the real life, and not stored in the brain by default.. (excepted instincts, which are maybe also programmed by DNS).
I've read in a medical book that babies even can't see at the time they are born (only just some shades, but not edges, details)..
I also heard that from a scientist, only 3 connected neurons are enough to keep a body in balance, and only 6 neurons were enough in an experiment that were connected to photo-sensors, and they could keep a stick balanced with electromagnetic field...after they were taught for it.

The robots in games could be taught by showing them what output to do for what input (e.g. seeing, noise, etc), which is right or wrong step.. Then their information after teaching them beforehand could be stored into virtual pre-taught brains, and they would be ready to fight when the game is released.

You can make experiments with tools:
http://www.mathworks.com/products/neuralnet/
http://download.cnet.com/Neural-Network-Designer/3000-2069_4-10..
etc..

Some knowledge base..
http://hagan.okstate.edu/nnd.html
http://ai-depot.com/articles/evolutionary-neural-networks-desig..

Hermit Software Hungary
2009-10-01 13:59
Wile Coyote
Account closed

Registered: Mar 2004
Posts: 646
Can you imagine if Chess games had proper AI. It would pose a number of advantages / disadvantages for the player. For every game played, the computer should become better, as being a Chess game, its soul purpose would be to learn and progress. Not having any emotions, it wouldn’t care it if won or lost, just so long as it got better. This could pose issues, from a game play perspective. One solution might be to throw in some pre-generated emotions: (that the player is not made aware of)

Example emotion: You feel ill
Effect: Reduces ability by 10%

Example emotion: You feel on top of the world
Effect: Increases ability by 15%

Example emotion: Your cat has been run over by a car
Effect: 100% - Shuts down, refuses to play ;D


2009-10-01 14:08
Martin Piper

Registered: Nov 2007
Posts: 722
While I agree with you the field of neural networks and learning AI is fascinating here is a story from my dim distant past. :)

I was once coding an entirely different game, 3D on the PSX. It involved aliens, face-huggers and space marines. :)

The design document specced mega intelligent aliens that would work in groups, hide from the player and then attack the player without any warning. The aliens should use AI to make use of walls and ceiling to evade detection. This was to be scary and tension building, just like the Aliens films.

This was implemented but the player feedback was that they couldn't really see the aliens to shoot them. They didn't like how the aliens would sneak up from behind and gore the player to death without any warning. :)

The problem is the aliens were too sneaky and it just wasn't fun to play against.

So all the AI was dropped in favour of scripted events where aliens would use animations to jump out of the door to the left when walking down the dark spooky corridor. Or they use animations to run as a pack along the wall then the ceiling in plain view of the player. Lots of scripted events when the player walked somewhere, or opened a door, or flipped a switch on the wall. Then once the scripted event was finished the aliens would fall onto the floor and run head first at the player.
This unintelligent system using very minimal logic was much better to play because as it turns out most players wanted to blast aliens to tiny bits with the array of weapons they had. :)
2009-10-01 14:22
chatGPZ

Registered: Dec 2001
Posts: 11386
Quote:
Can you imagine if Chess games had proper AI. It would pose a number of advantages / disadvantages for the player. For every game played, the computer should become better, as being a Chess game, its soul purpose would be to learn and progress. Not having any emotions, it wouldn’t care it if won or lost, just so long as it got better. This could pose issues, from a game play perspective.


at some point in history, chess engines used to work like this infact .... but it turned out that simple brute force table lookups work better =P you dont want to wait years until your chess engine is able to play like a 5 year old =D

and what martin said - in reality AI based on neural networks is fascinating indeed - but it isn't very useful for games.

what i would like to see however, would be a converter for pictures which is based on neural networks. there was one for the gameboy color, and it produced really great results. (unfortunately it was closed source commercial software, cant find any example pictures online)
2009-10-02 13:21
PopMilo

Registered: Mar 2004
Posts: 146
I messed around with AI before, and in one of my projects it turned out to be much simpler to define rules for each type of object in game... Lot of conditions and actions... Nothing inteligent but it did seem like that ingame :)

I do like the idea to use AI for graphic converter ...
I think genetic algorithms would be of much use...
Raw power of modern PCs can do miracle.
2009-10-02 18:32
Wile Coyote
Account closed

Registered: Mar 2004
Posts: 646
Of the many ideas I’ve had for games (some good, some not so good, some in need of extra work ;) reading this thread made be take one idea further. I don’t want to explain the idea in miniscule detail, but rather list a few bullet points. AI is key to the whole game experience.

Period: Based in the future
Location: Set a sky scrapper
Level Graphics: X-Ray (each level has the look of an X-Ray)
Imagine cutting a sky scrapper horizontally, and taking a top down view of an office layout. That’s how each level would look, in X-Ray form.

Game Play: One on one action. Think Alien vs. Predator.
The Player character remains outside the sky scrapper, not able to enter, only shoot inwards through the windows. The Computer character remains inside the sky scrapper, not able to exit, for fear of the Player, and only able to shoot outwards, though the windows.

Game Over happens once the Player looses all lives.
Game Completion never happens, as the AI increases level by level.
A level limit could be imposed, but that would remove the ultimate challenge (You vs. It)

Player Character: Future Cop, armed with big gun, complete with jetpack. Hovers to the left, right, top, bottom, of the screen, always facing inwards (to wards the (square shaped) sky scrapper).

Computer Character: Futuristic Reptile, armed with big gun, can walk, run, stop, think, hide, and obviously shoot.

Story: At present, there isn’t one, other than: The Futuristic Reptile is obviously some sort of terrorist, a threat, and needs to be wiped out.

Levels: Either predefined, or computer generated. Each level consists of an arrangement of walls.

Level Progression:
Lv.1 Computer Character AI level 1
On the elimination of Character AI level 1, the Futuristic Reptile drops its weapon, and spits out an egg. The egg hatches into a fully formed Futuristic Reptile that picks up the weapon, and heads up a Level in terms of both AI and Floor Level.

With each level progression, there’s an AI progression. The Futuristic Reptile level of AI learnt from the Player it is vs.

2009-10-03 13:20
Trash

Registered: Jan 2002
Posts: 122
@popmilo:
Genetic algorithms and AI is already in use, check out the info about NEAT ( http://nn.cs.utexas.edu/?neat ), a new way of ordering the neurons resulting in a NN ( Neural Network ) that is harder to overlearn and never have an overhead ( auto adjusting ) of the number of neurons within the middlelayers. I use it for OCR and some other projects of mine and it is way better than traditional NN's in several cases.
2009-10-03 15:24
Hermit

Registered: May 2008
Posts: 208
This is a great webpage, Trash...
The experiments are the most advanced that I have seen until now.

Recently I saw a similar method, which also tries to reach the development evolutionally: Polyworld.

http://www.youtube.com/watch?v=nWH64f8rc64

http://en.wikipedia.org/wiki/Polyworld

In details:
http://www.youtube.com/watch?v=_m97_kL4ox0

And the Polyworld software is downloadable from Yaeger's page:
http://www.beanblossom.in.us/larryy/PolyWorld.html

Using evolution model seems a great method in searching secrets of AI, and the best thing is that we can fasten the process that has taken millions of years for nature... We are like a virtual God :)

(Other thing: What if neural AI can be used to calculate square-root, prime numbers, etc..?)

Hermit Software Hungary
2009-10-03 18:26
Hermit

Registered: May 2008
Posts: 208
Hmm, who has known about this?

A BASIC program from 1987 with pattern recognition,
neural network simulation for C64 by John Walker :)

http://www.fourmilab.ch/documents/c64neural.html

Hermit Software Hungary
2009-10-03 20:39
Trash

Registered: Jan 2002
Posts: 122
@Hermit:
The method described in polyworld (really interesting link btw) is far from being the same or in any way similar to the NEAT-method, the only thing they have in common is the use of gentic algorithm's, they differ widely in the way they use it. In polyworld they use the genetic algorithm to combine the DNA of different species making the AI evolve with an natural selection, in NEAT you evolve the neurons layers to be as fit to the selected problem as possible. The resulting main difference can be seen in the leraningcurves, when polyworlds learningcurve peaks there can be no fitter animals within the world, a similar problem solved by NEAT would not peak it would just get smarter the further you let it run since the worlds parameters dont stop it from peaking.

This is why we see more and more implmentations of NEAT aimed at CUDA and similar interfaces pop up around the internet. Now i am missing a cuda-card but I would sure be interested in making my softwares take advantage of it.

From a C64 POV I'd love to try implement a fully trained NEAT-network and make somekind of realtime logodrawer around it, imagine a greetingspart drawing up other groups logos based on their common style (this is pretrained) and name (the input to the NN). That is ofcourse a hard task but far from impossible.
Previous - 1 | 2 | 3 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
iceout/Avatar/HF
psenough
sln.pixelrat
syntaxerror
The MeatBall
t0m3000/hf^boom!^ibx
Ramon B5/DESiRE
Codey/Second Dimension
Guests online: 133
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Mutetus  (9.7)
3 Jeroen Tel  (9.7)
4 Linus  (9.6)
5 Stinsen  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.072 sec.