Does the stamp support self modifying software.
.:John:.
Posts: 64
Does the stamp support self modifying software. Does it support a "master-slave" setup?
Post Edited By Moderator (Chris Savage (Parallax)) : 10/10/2007 2:37:21 PM GMT
Post Edited By Moderator (Chris Savage (Parallax)) : 10/10/2007 2:37:21 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, that's similar to having computers generate Poetry -- it STILL takes a human to provide feedback when they're doing it "right".
In any event, they've published the download code, so you COULD create a PC that dynamically re-programs an attached 'real-time' BS2 platform. I'd think it would be a lot of work, however.
A·Stamp is not a good candidate for generating genetic algorithms. You need great string and/or list·handling.
I have written many genetic algorithm programs, or programs that produce other programs that continually evolve by testing for a better "fit", weeding out the "weak", mutating the "strong" (the ones that statistically come closer to solving the problem than do the weak ones) and doing it all over again, perhaps millions of times, but usually a few hundred thousand is sufficient to achieve acceptable results on the order of something like recreating the quadratic formula.
Genetic algorithms are simply incredible and amazing to watch as they execute. (Of course, watching them slows them down enormously.)
I have thought about writing PC-based code that would create Stamp programs ala above. I can in no way be called an expert in this field; however I have done quite a bit of it. Nothing I might write would ever do anything significant, but I believe creating syntactically correct PBasic programs that might correctly use unique features of the language to do things in a new (weird?) way would be relatively easy.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
Post Edited By Moderator (Chris Savage (Parallax)) : 10/10/2007 7:44:39 PM GMT
Has the Parallax forum just been spammed?
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
Ken Gracey
The main reason why a Stamp is not a good candidate for self-modifying code is that the definition of the byte codes used by the Parallax Basic interpreter is not public information. It's proprietary to Parallax, so you don't really know what you need to generate or modify. It's possible to figure it out by compiling different statements and operators and seeing what gets produced by the compiler, but there's no existing documentation on this.
The BS2 became self aware on date......
Post Edited (skylight) : 10/10/2007 10:59:58 AM GMT
you see thats the trouble with programmers these days, used to having large resources to play with, in the old days(70's) you'd be surprised what could be fitted into tiny memories.
Post Edited (skylight) : 10/10/2007 2:04:34 PM GMT
In general, you want representations (chromosomes) in which small changes in structure lead to small changes in behavior. A parallel network of analog or logic elements would be an example, and there has been some research here optimizing configurations for FPGAs (field-programmable gate arrays) using GAs.
My recommendation, if you still want to explore optimization of sequential algorithms, is to design a simple, virtual CPU that you can simulate on your PC. Keep the instruction set small to start with. You can always add instructions later. Make sure that the task you want your CPU to perform is clearly defined, and come up with a utility function that not only rewards total correctness but also provides numerical measures of "pretty good" and "not so good".
Good luck with your project! GAs are lot of fun to play with and can yield some surprising results. But you have to employ them with your eyes open and not expect miracles.
-Phil
Phil said the following (I don't know why I suddenly cannot get the format correct!) . . .
My recommendation, if you still want to explore optimization of sequential algorithms, is to design a simple, virtual CPU that you can simulate on your PC. Keep the instruction set small to start with. You can always add instructions later. Make sure that the task you want your CPU to perform is clearly defined, and come up with a utility function that not only rewards total correctness but also provides numerical measures of "pretty good" and "not so good".
I agree with Phil 100%. He put if far better than I.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
A Stamp simply will not do what you want. I don't think the Propeller would, either . . . but, I bet you could cut some wicked assembler for it! (I know very little about the Propeller. Perhaps others will chime in concerning it and this subject.)
You need to use a PC. I have done it almost acceptably on a fast tablet-PC. But, all my programs were "proof of concept" type things designed just to see if I could do it in Visual Basic 6.0! (I could. It was tedious to say the least. However, once you get a template going that does all the garbage Windows demands, then it is not too bad.) My choices would be assembler--because I used to be an insane bit-blaster or c, although I am not too good with c. There are other languages that will work, as well.
The difference between what I have done and what you want to do, even initially, is huge. However, I encourage you to go for it: Study GA. Like Phil said, build a phony instruction set and put GA to work on it.
You could (eventually) build a 'bot using Stamps and stick a tablet-PC on it or in it that talks to the Stamps, downloading ever more successful progeny to the Stamp(s). For that matter, you could stick some 1Us in a rack, network them, WiFi'em,·and go into the GA-wireless Stamp business BIG TIME!
Buy some GA books. I have several. The high-end ones are over my head, mostly. I still gain something from them, though.
It doesn't hurt too much that my daughter and her husband are both brand new PhD geneticists. (Molecular Biology; but you do not need resources like that. Like I said, get a book.)
Go for it! Darwin would like it.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
So tell me if this is what you guys are suggesting:
I could have my computer do the algorithms and send them to the basic stamp. The stamp then executes them.
Is that what you guys are saying?
Yes, you could do that.
However, I do not think any of us are saying much of anything about GA, including me. I am encouraging you to investigate your ideas, though. GA is more than just fascinating. It can actually be a little scary due to its evolutionary, survival of the fittest nature. It is CAPTIVATING to watch hundreds of thousands, or millions, of generations evole in minutes instead of millions of years.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
If you put a 2000 Instruction Per Second processor in that loop, it will take forever.