I think I'll go and buy a monkey instead. (And a book about algorithms...) KreAture ----- Original Message ----- From: "Daniel Serpell" To: Sent: Monday, June 23, 2003 5:23 PM Subject: Re: [PIC]: New version of the PIC Superoptimizer. > On Mon, Jun 23, 2003 at 07:50:31AM -0700, James Newton, webhost wrote: > > source= http://www.piclist.com/postbot.asp?id=piclist\2003\06\20\201728a > > > > Let me see if I understand: > > > > This program contains: > > a) a small language in which you can define an algorithm > > b) a program to generate random inputs for that algorithm and record the > > result > > c) a PIC simulator > > d) a program to generate random sequences of PIC instructions > > Not random, the sequences are tried exaustively. First, all one inst. > sequences, then all 2 ins. seq., etc. > > > And the program then tries different sequences until it hits upon one that > > produces the expected outputs when given the inputs? > > Yes. > > > So it generates code in the same way that the old joke about the room full > > of monkeys randomly typing will eventually produce the works of Shakespeare? > > > > And this actually works? I must not be understanding something. > > Yes, it works for small code fragments. You can search thru all 6 > instruction sequences in about an hour in modern computers, 7 inst. > sequences in a couple of days, 8 inst. sequences in a couple of > months, etc. If fewer instructions are tried (it's configurable), > you can go up thru 9 instruction sequences in a reasonable amount > of time. > > Test the examples, and give coments! > > Daniel. > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.