is there anyway to use algorithims *or something else* to detect patterns?
Printable View
is there anyway to use algorithims *or something else* to detect patterns?
Its been a while since I've done anything with patterns, but what I recommend is figuring out how to detect a pattern on paper and then convert that into an algorithm.
Why not google for "pattern recognition"?Quote:
Originally Posted by RockStarEnergy
Probably the best pattern recognition you'll ever find is your own brain, so I guess there's the "something else" you were looking for.... But as for what you're asking, I think we'd need to know more specifics first.
There are entire books written on one specific area of pattern recognition: Character recognition, and I could talk about GA pattern recognition engines in specific circumstances. However, we probably would need to know what types of patterns you are proposing to recognize. Some problems would be vastly harder than others.
im not really looking for any specific pattern detection.
even something that would guess numbers after so many tries using probability and maybe some lists and such. but even a basic "this is sorta how a pattern theory kinda thing works" would help. im eventually going to try to develop an AI system for like checkers or poker. *all that codes done, just cant get it to adapt to strageties"
You don't go for simple questions, do you?
I've worked on a couple genetic algorithm (GA) based learning systems for a hobby. One of them evolved polynomial equations to match patterns of data, while another evolved stable population equations in chaotic systems. Both were fascinating projects to tinker around with, but for a GA solution, you need to be able to do a couple of things to make them practical:
First off, you will need MANY generations, so you can't be looking at the results of each generation and grading them by hand. Therefore, you need the computer to be able to evaluate how well each genome matched the pattern such that you can assign a grade to each one. These grades can't be a simple YES/NO, because you need a range of performance. In the case of the polynomial matcher, I could sum the difference between the true line and the predicted line, with the smaller the sum, the closer the prediction was to truth. This allowed for a virtually infinite gradation, which was nice.
You also need to be able to explain the problem in terms of genes. In the case of the polynomial GA, I noted that an equation, when written on a sheet of paper, consists of nothing but a string of symbols, each of which has meaning only in our own eyes. It went a bit beyond that, but that's that basic recognition. Each symbol was a gene, and the string of symbols that formed an equation was a genome. Frankly, I have never figured a good way to explain how to digest a problem down into genes.
One problem I got looking at was evolving a chess playing program. I had been working on a behavioral GA, and was wondering if it would be possible to move the concepts over to chess. The basic principle is that if you have sufficient genes, then you can evolve a solution to ANYTHING, but how do you create the genes? In the case of a poker game, you may not need genes at all, because there is a known optimal strategy based on the cards currently on the table, the cards in the hand, and probabilities. This is how card counting works, and memorization alone is sufficient to be perfect at that.
A more difficult game would be Bridge, where all cards are in hands, and the bidding is highly complex (unless you strictly adhere to a system). However, if you take emotion out of it, and everybody knows the same bidding system, and nobody makes mistakes, then the bids are utterly predictable based on the cards in the hand, and the other bids. Furthermore, you can generate probabilistic playing strategies that require no learning of any sort, so pattern recognition and learning may have nothing to do with it. This is what happened when I got thinking about the chess program. Eventually, I realized that certain endgames were irrational based on the rules that applied anywhere else in the game. In effect, if you learned the rules for the mid-game, you would have to learn a different set of rules to EVER figure out a rook-king end game. After a bit of research, I found out that computers switch to a set routine to handle endgames, so they recognize that the rules for the mid-game are different. Worse, I also read some research that showed that chess masters only evaluate one or at most two moves, and only a couple moves deep. How do they know which move to evaluate? Memory. Studies have shown fairly conclusively that chess masters are so good because they have played so much chess that they recognize virtually any pattern of pieces. No learning, just memorization. You should have the same problem with checkers.
If you were to represent every possible set of positions on a checker board, and indicated the best move in every case, then you would be doing something close to what chess masters are doing with chess.
However, if you let emotion add something, then life gets a bit more interesting. With emotion, you can take a game like bridge, and come up with a series of genes that prompt a player to be more risky, or less risky. Genes to favor one bid over another, and genes to respond to how the last hand went (which is irrelevant, yet it impacts human players). You would want as many genes as you can possibly think of, with some genes pushing one way, and other genes pushing back. Then you would want to set up a series of players (four if this is bridge), and let them play against each other. Their average score across dozens or hundreds of games (whatever seems sufficient to adequately evaluate a strategy) would give them a fitness. Then re-combine the genomes with the highest fitness having the greatest chance of reproducing. Over time, the player will get better and better.
wow.
i think i get the jist of what your sayin but its still a few thousand feet above my head.
and i read the same thing about chess master. thought it was amazing.
and i was pretty sure i was gonna need some sort of memory storage to get this ai to work but idk what. or what to store in it. could it be possible to have it store moves/strategies throughout the life of the program and eliminate which ones wouldn't work based on what the player does. i think that would make the game harder after each game that you win untill you can only win by chance.