Shop OBEX P1 Docs P2 Docs Learn Events
The data statement and Simulations — Parallax Forums

The data statement and Simulations

leshea2leshea2 Posts: 83
edited 2006-03-09 18:38 in BASIC Stamp
Is it possible to make the BS2sx read and analyze info stored in it using the data statement, so that I can ask the stamp a question and have it answer the question based on the info it read and analyzed ?

I don't mean estimating numbers, I mean programming the stamp with the molecular makeup of a rose and a sunflower, then telling the stamp to make an educated guess as to what a cross bread between the two flowers would be like on it’s molecular level.
I hope this is clear, Thanks !

I hope this is clear, Thanks ! ·smile.gif

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-01 20:52
    No, I don't think so -- seems more like an application for a PC and an AI language like Prolog.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • leshea2leshea2 Posts: 83
    edited 2006-03-01 21:25
    Thanks, but as far as languages go, would basic work ?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-01 21:56
    You can probably find AI code in BASIC -- that's where "Google is your friend."

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • leshea2leshea2 Posts: 83
    edited 2006-03-08 23:22
    Is it possible to use the Random statement to generate something other than just numbers ? Like could I "program the stamp with the molecular makeup of a rose and a sunflower, then telling the stamp to make an educated guess as to what a cross bread between the two flowers would be like on it’s molecular level", using Random statement ?

    Thanks !
  • Mike GreenMike Green Posts: 23,101
    edited 2006-03-09 00:05
    The simple answer is no, you can't. Generally computers (and the Stamp is a simple computer) are good at doing numeric calculations, small integers in particular. The more complicated computers can "natively" do floating point and, sometimes, character string manipulation. The trick in programming languages and their built-in libraries of subroutines and functions is that they represent more complex information and algorithms using the "native" stuff. There are programs that keep libraries of DNA patterns (represented internally as numbers and character strings) and could effectively do a random cross-breed of two slightly different genes (by doing random recombination). That doesn't sound like what you want. Truthfully, we don't even understand what really happens on the molecular level in crossbreeding and, even if we did, the programs that manage this kind of data require large and fast computers, several orders of magnitude bigger than a Stamp. You could probably create a very-very simple example of crossbreeding with two made-up genes of a few (10-20) base-pairs and write an algorithm to randomly mix the two according to some rules that you make up. That could be done with a Stamp.

    Mike Green
  • leshea2leshea2 Posts: 83
    edited 2006-03-09 00:18
    Thanks for your help, and for the record, I do mean a "program that keeps libraries of DNA patterns (represented internally as numbers and character strings) and could effectively do a random cross-breed of two slightly different genes (by doing random recombination)"
  • leshea2leshea2 Posts: 83
    edited 2006-03-09 18:38
    Anybody, are there any examples of how I would get started on making "a very simple example of crossbreeding with two made-up genes of a few (10-20) base-pairs and write an algorithm to randomly mix the two according to some rules that you make up" ? What I mean is what kind of command references could I use to get started on a program like that, other than "I'm guessing", the Random statement ?

    Please, if anyone knows something, let me know !

    Thanks for your help !

    Post Edited (leshea2) : 3/10/2006 11:55:04 PM GMT
Sign In or Register to comment.