Welcome To Darwinbots > Newbie

Methinks it is like a weasel

(1/3) > >>

asterixx:
I've written several simple programs in C++ and VB, and I was wondering how I could go about writing a Weasel Program, and I figured there might be someone here who would know how to write one. Any ideas on this?

Numsgil:
It's probably pretty easy.  Is this the sort of algorithm you're thinking?

1.  Mark all characters in your string as non static.
2.  Produce a random letter for each non static character in your string.
3.  Examine the string against the goal, and for each letter that matches, mark it as static.
4.  Repeat to 1 if there are any non-static characters.

asterixx:
Precisely what I was thinking. Once I could come up with a structure for something like that I would have no problem adapting it and making a pixel version or something. How would I include characters like ". , !" and so on?

Numsgil:
If you just used a char for each letter, you could have the sentence be any ASCII character, including punctuation.

asterixx:
I'm going to experiment a bit. I'll get back to you on this.  

Navigation

[0] Message Index

[#] Next page

Go to full version