ok i've been trying to see through the code.

I'm not sure how github works but I pushed the changes in my repo again 
(https://github.com/ayaderaghul/sample-fsm/blob/master/fsm0.rkt). Basically, I 
rewrite the automaton module (description and behavior) because previously I 
made a confusion between the number of the states and the number of actions for 
each state. Now the automaton is less readable but more simple.

I also add some test that can be run with 
```
~laptop$ raco test fsm0.rkt
```

However I dont know to run this code without a repl.
Because the whole file fsm0.rkt is a module and it has many nested modules 
inside, and the command i need is in the nested one. There is a special module 
that has this command:

```
(module* main #f
    (run))
```

So if i want to run a trial of the file, i open a repl:

```
~laptop$ racket
> (require (submod "fsm0.rkt" tv))
> (run)
```
and it runs and plot the result.

I dont want to open a repl. How to run the command right in the terminal 
(Because later on i want to run the command with arguments in the terminal)? 
for example, I've tried this but it doesnt work:

```
~laptop$ racket fsm0.rkt '(require (submod "fsm0.rkt" tv))' '(run)'
```

Thank you,
Chi




On Sunday, 11 October 2015 09:24:07 UTC+2, Linh Chi Nguyen  wrote:
> Thank you very much,
> Im trying to see it. However Im very unfamiliar with module in racket.
> 
> So far I can only answer you this:
> 
> about your comment 
> 
> > [define survivors (drop population speed)]
> > ;; MF: THIS LOOKS LIKE IT MAY "RESURRECT" AUTOM. THAT ARE ALIVE
> > [define successors (randomise-over-fitness accum-fitness population speed)]
> 
> The point of the simulation is that it "ressurect" already available 
> automata, regarding their fitness. Hence who has higher fitness gets more 
> offspring and grows in size gradually (at the expense of the poor doers).
> 
> What is not right here is the word "ressurect" and it catches your intuition.
> 
> I'm not a native English speaker and they are complaining that I should get a 
> native English speaker to proofread my paper. Sorry for that :)
> 
> On Sunday, 11 October 2015 05:07:02 UTC+2, Matthias Felleisen  wrote:
> > I forked, Racket-ized, and gained some speed (~2x). 
> > 
> >

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to