Ryan Morris wrote:

> The code is VB, since that's what we've been using in school for the last

> year or so.  I'm not sure what you mean by the teacher has decided to use

> the forum to get questions from you?  He doesn't know about the forum, so he

> can't really post to it.  I'm using it to help people learn the stuff, since

> the teacher isn't teaching it because he is not a capable individual.



As I suppose from the post, your teacher is Arkin, if that is realy him,

he did make a meson-members-only thread on the forum. It could as well

have been a joke, but it didn't seem likely.



> We could be solving the problems by using the built in components, but

> that's not the point - we need to know how to actually do them.  It's part

> of this project called the dossier that we have to do.



Hehe, if you're doing that in VB, it's kind of pointless: all of VB's

function is matched in pre-written (built-in) components, hence the

requirement for a runtime module. If you'd really want to know how

things are done, you'd have to learn asembly. Using raw binary logic and

port-wise read/write is as close as you can get in Basic (actualy, it's

worth the effort, it's rather speedy compared to anything).



> About your pattern recognition program, it sounds interesting.  What pattern

> does it look for exactly?  What does it do?  I'd be interested in the

> algorithm, how is it implemented?



Usualy, when looking for a pattern, we'd make a double FOR...NEXT loop

and test everything to anything. This is not too cost-effective to me.



I previously knew how to compare the new data segment with the previous

one:



--- Begin quote ---

xOld = xNew

Get #1,,xNew

IF xOld = xNew THEN...

---- End quote ----



And I also knew the tricky tech how to create a constant 'tail' of the

data sequence (known as the "mouse trail" effect):



--- Begin quote ---

z = z + 1

Tail(z MOD Lenght) = CurentData

---- End quote ----



I employed my brainpower here =] and combined the techs, creating an old

tail and a new tail and being able to compare them. If the two tails

match, at a given tail lenght, we must have a repeating pattern.



Neat, eh?



The program works in a way, that it increases the tail lenghts, if it

does not find a pattern (it also uses retries, to null out the

possibility for a bad offset).



I wanted to create a kind of artificial life-form that seeks challenges,

armed with it's abbility to detect patterns (once it gets a pattern, the

input is no longer a challenge), it scans any input it can get, of

course what else but the hardware ports. If I attached a random bit

generator to one of the COM ports, my program would attempt to crack the

pattern in what it had to say. [Need I say here that this program

provides a perfect and universal random-number source?]



> P.S. We aren't doing anything interesting in school, nothing fun.  Just

> learning linked lists and data structures, you're probabyl familiar with it

> already.  Like I said, nothing fun, just technical stuff.



I'd bet there will be interesting stuff in there soon, there always is.



--



Don't feel bad about asking/telling me anything, I will always gladly

reply.



Digging for info? Try AI Meta Search:

Http://WWW.AIMetaSearch.Com



MesonAI -- If nobody else wants to do it, why shouldn't we?(TM)

Http://WWW.MesonAI.Com

