s c h e m a t i c s : c o o k b o o k

/ PearlsChapter / Cookbook.PearlFunAndGames

This Web


WebHome 
WebChanges 
TOC (with recipes)
NewRecipe 
WebTopicList 
WebStatistics 

Other Webs


Chicken
Cookbook
Erlang
Know
Main
Plugins
Sandbox
Scm
TWiki  

Schematics


Schematics Home
Sourceforge Page
SchemeWiki.org
Original Cookbook
RSS

Scheme Links


Schemers.org
Scheme FAQ
R5RS
SRFIs
Scheme Cross Reference
PLT Scheme SISC
Scheme48 SCM
MIT Scheme scsh
JScheme Kawa
Chicken Guile
Bigloo Tiny
Gambit LispMe
GaucheChez

Lambda the Ultimate
TWiki.org

Fun and Games

These are a few little toy examples for modelling finite state machines in Scheme. There are better ways to do it. It's just really basic stuff for fun.

Basic Finite State Machine

Finite state machines are useful for alot of things, and not just compilers. They are used heavily in video games, controls, robotics and for modelling any kind of task which involves a state and actions. There are plenty of tutorials around that discuss this much better than I can do in a paragraph.

500 Can't connect to 127.0.0.1:8778 (connect: Connection refused)

Probabilistic State Machine

Probabilistic state machine is similar to the FSM. But it uses a probability to choose the next state, instead of being determined. Thi s can be simulated by rolling a virtual 'die' generating a random number.

500 Can't connect to 127.0.0.1:8778 (connect: Connection refused)

I hope this is useful to anyone. Take these examples and make them better, they are very basic. I am pretty weak at scheme still, but I code in C for along while. So it probably shows ;-)

-- OpcodeFoo - 15 Nov 2005

CookbookForm
TopicType: Pearl
ParentTopic: PearlsList
TopicOrder:

 
 
Copyright © 2004 by the contributing authors. All material on the Schematics Cookbook web site is the property of the contributing authors.
The copyright for certain compilations of material taken from this website is held by the SchematicsEditorsGroup - see ContributorAgreement & LGPL.
Other than such compilations, this material can be redistributed and/or modified under the terms of the GNU Lesser General Public License (LGPL), version 2.1, as published by the Free Software Foundation.
Ideas, requests, problems regarding Schematics Cookbook? Send feedback.
/ You are Main.guest