Skip to main content
GameDev.net gamedev.net
🔒 Locked

Image Recognition

Started by guillermoro Mar 29, 2006 at 5:31 PM 14 replies 3k views
Original Post
guillermoro
guillermoro
Im designing an ai that needs to be able to play a game the same way as a human. The only data it will get about the game is an array of integers that represent pixels. Another very useful thing would be the ability to create characters from pixels or actually reading letters off the screen. This may be unrealistic but i could simplyfy the task because the game uses only one font. Ive done quite a few searches and gotten some info but i would really appreciate any info that anyone could give me on any topic that this ai needs. Ive gotten a demo to work but it only plays pong and does it relatively poorly Thanks
serg3d
serg3d
Recognition of images, letters, and geometric reconstruction is a huge area of science and technology. You can check Computer Vision online library to get an overview:
http://homepages.inf.ed.ac.uk/rbf/CVonline/
Some of methods are very fast and work even on the cellular phone with camera.
But the only way you would really need it if you AI control a real robot in the real world. If your AI is acting in the simulated enviroment you can get the same behavior a lot more easy if you just chek the line of site, distance to object, introduce artificial errors based in them and just send coordinates and identifiers to AI.
Steadtler
Steadtler
Search for those keywords:
pattern matching,
pattern recognition,
content-based indexing,
machine learning.

Some good journals/conference with papers on this subject:

journals: Journal of Pattern Matching, Artificial Intelligence (journal)

Conferences: ICPR, CVPR, ICCV

The 'popular' approach right now for image recognition is through "support vector machines". Tons of papers on this, it has rised in favor while people are abandoning connectivist methods.

Good luck!

edit: serg3d is right by the way, its a HUGE area, be prepared for a LONG litteracy review.
guillermoro
guillermoro
Thanks for the replies guys :-)
tjweb92
tjweb92
This will take all your RAM[random access memory] and all of allot of disk space.
Check my forus at http://s14.invisionfree.com/tsoftor http://tjsoftware.tk
joanusdmentia
joanusdmentia
Another thing to note is that your solution will be *very* specific to the game your AI is playing. Pong, for example, is relatively simple, you only need to recognize 3 simple objects (1 ball, 2 paddles), this can be made easier by using different colours for each object. Getting an AI to play Doom 3 this way however would be nigh impossible without a supercomputer.
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The nly verdict is vengeance; a vendett o
guillermoro
guillermoro
lol dont worry my ai wont be playing doom anytime soon. I know i could do some simple solutions with pong, for example i could test only two columns to find the top left x and ys of the paddles and then just look for the rop left ball coordinate. Actually thats what ive started to do but it feels like my ai is cheating.
RPGeezus
RPGeezus
If you're only using one font, you can use a simple pattern matching routine (cross correlation) to recognize letters.

It doesn't have to be anything complicated, since you're not matching unknowns-to-knowns (like face detection), but are mapping knowns-to-knowns.

The more I think of it, the more I think a cross-correlation algorithm will work for you.

Like joanusdmentia said, this will be very specific to one application.


Almost forgot: What are you working on??? Can we see it? It sounds cool.
Will
guillermoro
guillermoro
If i ever finish ill post something, been busy lately though.
ItsDoh
ItsDoh
Quote:
Actually thats what ive started to do but it feels like my ai is cheating.


How is that? If you want a realistic AI for a game like Pong you should be modeling a delayed response like humans have, and including a margin of error on where it predicts the ball will land.

If you force the computer to 'view' the game the way the player does you'll never have a competetive AI on any 'real' game. That type of 'viewing' wouldn't even be desirable for a game AI.
Cubed3
Cubed3
Hes making a bot for a game!!
deftware
deftware
Quote:
Original post by Cubed3
Hes making a bot for a game!!


I had an idea to make a bot for Counter-Strike like this before. Just combining an aimbot and an image-recognition AI to run around the map and navigate for you.

Then you could just sit back and watch it do its thing.

But the project turned out to be harder than I thought it was going to be.

Someday!
[ deftware.org ]
dog135
dog135
One thing people keep forgetting about the human brain, is that we can't really process a full image of data 30 times a second. If you tried viewing a slideshow that way, it'd be a blur. Our brain with find components in an image, then assume it's either in the same area, or is moving to a predictable location, then look for that same object in one of the possible new locations.

Your Pong AI could look at the screen, find the paddles and ball, then predict possible future locations for each component. The AI's paddle is very predictable, the ball only changes direction when it strikes a paddle, so the only truely unpredictable component is the oponent's (human's) paddle.

If you want to be tricky, the human brain, at first, thinks that each component can move in any direction at any time. But after a while, it'll learn what the boundries for the movement are. Give your AI the ability to use "experience" and it'll be much more flexable in the future.
E:cb woof!
TriKri
TriKri
How would you give your AI the ability to use experience? What you mentioned now was only a specific case where I guess you have to program your AI to learn that a paddle often keeps going in the same direction as before. But how do you use that fact when it is discovered? And what if you want your AI to be able to learn more things than that?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.