Brendan Galvin wrote:
> 
> Rob Dixon <[EMAIL PROTECTED] wrote:
>> 
>> Mr. low level newb of stupidity ;) wrote:
>>>
>>> hello, I am a, well, not a beginner per say, but rather still a
>>> learner of Perl. I guess you could call me a beginner. anyway, I need
>>> some help with my robot. it is not really Perl help, but you guys
>>> could help with the code, too. I am making a talking robot like
>>> A.L.I.C.E., a robot designed by a guy named Richard s. Wallace, and I
>>> am having trouble deciding what to make him know. he knows basic
>>> stuff, and the coding is somewhat fine, but I was wondering if you
>>> guys could help me out here. he knows how to respond to his and
>>> hellos, also more interesting stuff like his birthday and to
>>> understand when you say something like 'I feel like crap' or
>>> something, but he is still kinda dumb. any advice on how to improve
>>> him with knowledge would be appreciated.
>>>
>>> P.S. the code for what to say and what to say it to is regular
>>> expressions. tell me if you have a better method.
>>> e.g.    elsif($reply =~ /\bwhat\b/ and $reply =~ /\btime\b/){
>>>       print"I surely dont know the time.";
>>> talk();
>>> }
>>> talk is the subroutine that asks for input.
>> 
>> You're looking for an implementation without a solution to implement, or in
>> the end really a problem to solve. I suggest you start by defining the 
>> problem and then attempting a general algorithmic solution. Depending on the 
>> outcome you may want to redefine the problem and reattempt a solution. Only
>> when you have something you want to implement should you start writing Perl
>> (or indeed any other language).
>> 
>> What you have done is to buy a ton each of bricks, cement, sand, aggregate
>> and timber, and then sat down to wonder, "What should I build?".
>>
>> (By the way, it would help not to denounce yourself in your email address.
>> You are as good as anyone else who doesn't know everything.)
>
> so you are basically telling me my idea is stupid, correct?

No, not at all. You misinterpreted my post.

> well, in any case, I did not just think "what should I build?" I thought it
> through and thought of many ways to do it, so actually, you are not helping
> at all.

I have no idea know how well you thought things through, but I hoped you would
be encouraged to express your design ideas at a much higher level. A program of
the type you describe isn't trivial, and you need to consider things much more
broadly before you start to write code.

Think about what sort of input you want to handle, for instance. Are you only
expecting a couple of words or can your program respond to long sentences? Only
questions? Or commands as well.

This list can help you with ideas about how to solve problems in Perl, but the
topic you have touched on is vast and we can't really contribute before you have
made a lot more decisions yourself about what sort of algorithm you want to
implement.

Rob

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to