Prolog suitable for this problem?
From: Stephen Waits (steve_at_waits.net)
Date: 02/26/04
- Previous message: Bill Spight: "Re: Solving quiz using Prolog"
- Next in thread: Martin Sondergaard: "Re: Prolog suitable for this problem?"
- Reply: Martin Sondergaard: "Re: Prolog suitable for this problem?"
- Reply: Stephen Waits: "Re: Prolog suitable for this problem?"
- Reply: Benjamin Johnston: "Re: Prolog suitable for this problem?"
- Reply: Benjamin Johnston: "Re: Prolog suitable for this problem?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 Feb 2004 11:20:07 -0800
Hi all,
I'm new to Prolog, but not letting that slow me down :)
Anyway, I need to encode a set of game rules... (imagine basketball,
or hockey, in which case the rules would be based on the NBA or NHL
official rules).
Let's say that connected to this Rules code is an Engine, which moves
players around, deals with the ball, or puck, goals, court/rink
markings, etc. This Engine sends events to the Rules code, which then
controls the flow of the game. For example, on a certain event, the
Rules code might set the game to a free-throw state, make an icing
call, determine the quarter/period has expired, etc.
The idea here being that we could easily substitute different
rulesets, say perhaps College, or High School; or even Practice, or
"Horse", or a Penalty Shot Challenge, etc...
My plan has been to code this Ruleset as a handcoded HSM; however, now
I'm wondering if Prolog might make more sense. That leads me to my
specific questions:
*) Does Prolog make any sense for this problem? Actually, the real
question should be: Does Prolog make more sense than a handcoded HSM
for this problem?
*) If so, how would you approach this type of game ruleset in Prolog?
Thanks,
Steve
P.S. - I'm looking for the straight dope; don't hesitate to talk to me
like I've been coding Prolog since Borland was actually producing
something innovative products. I might not get it right away, but
won't bother you with my inexperience - I'll catch up quickly.
- Previous message: Bill Spight: "Re: Solving quiz using Prolog"
- Next in thread: Martin Sondergaard: "Re: Prolog suitable for this problem?"
- Reply: Martin Sondergaard: "Re: Prolog suitable for this problem?"
- Reply: Stephen Waits: "Re: Prolog suitable for this problem?"
- Reply: Benjamin Johnston: "Re: Prolog suitable for this problem?"
- Reply: Benjamin Johnston: "Re: Prolog suitable for this problem?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|