I forked, Racket-ized, and gained some speed (~2x). 


> On Sep 6, 2015, at 5:21 AM, Nguyen Linh Chi <nguyenlinhch...@gmail.com> wrote:
> 
> Dear All,
> thanks for all your help, im writing the code to generate a population of 
> fsm, playing a repeated game and the population evolves over time. (no 
> mutation yet). here on my github just fyi:
> 
> https://github.com/ayaderaghul/sample-fsm 
> <https://github.com/ayaderaghul/sample-fsm>
> 
> Btw, the blogger suggests that because the automaton only needs to know the 
> current-state, if the population scales big, we just need to separate the 
> current-state as a single atom outside the machine itself (for better 
> performance). 
> 
> I hope this may helps make the thread more complete.
> 
> 
> On 4 September 2015 at 20:50, <mrmyers.random.suf...@gmail.com 
> <mailto:mrmyers.random.suf...@gmail.com>> wrote:
> On Friday, September 4, 2015 at 9:31:36 AM UTC-4, Michael Myers wrote:
> > You might want to take a look at https://github.com/mromyers/automata 
> > <https://github.com/mromyers/automata>
> > specifically, https://github.com/mromyers/automata/blob/master/examples.rkt 
> > <https://github.com/mromyers/automata/blob/master/examples.rkt>
> > and https://github.com/mromyers/automata/blob/master/machines.rkt 
> > <https://github.com/mromyers/automata/blob/master/machines.rkt>
> >
> > I more or less just use the definition that was in my textbook: you provide
> > a transition function, and the DFA or NFA just uses stream-fold to get the
> > extended transition. I used a bunch of generics stuff to try to generalize
> > everything past the point of practicality, but it's still reasonably
> > fast.
> >
> > It's not documented, but use (in-machine? M seq) to check for acceptance,
> > (extended-transition M start seq) for final state(s).
> >
> > There's also a minimization function and nfa->dfa conversion in there, but
> > they're a bit fragile, so use at your own risk.
> 
> Sorry for the duplicate, this was sent yesterday, and only arived just now.
> 
> --
> You received this message because you are subscribed to a topic in the Google 
> Groups "Racket Users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/racket-users/4o1goSwrLHA/unsubscribe 
> <https://groups.google.com/d/topic/racket-users/4o1goSwrLHA/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> racket-users+unsubscr...@googlegroups.com 
> <mailto:racket-users%2bunsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> 
> 
> 
> -- 
> Nguyen Linh Chi
> 
> -- 
> 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 
> <mailto:racket-users+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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