Eliza Chat bot과의 대화 내용:
> Hello. My name is Eliza. How may I help you?
* Just chat please
> Ahh. Please continue...
* I heard about you
> We were discussing you, not me.
* can't we talk about you?
> Oh...?
* I'm interested in you.
> Do you believe it is normal to be interested in me?
* yes. pretty normal. I think.
> Do you really think so?
* yes. cause of you're an A.I. program.
> What makes you think I am A. you. program?
* you were made to chat with people.
> You're not really talking about me, are you?
* yes.
> I see.
* anyway, sorry to my poor english.
> Apologies are not necessary.
꽤 그럴싸한 대응을 보인다.
의사의 권위, 질문, 되묻기 정도의 간단한 대화 스킬만으로 인간스러움을 획득하고 있다.
|
* rand()함수를 이용한 간단한 펄 주사위.
dice.pl====================================================
#Dice
$diceNum = int(rand(6))+1;
print $diceNum;
#일반적인 정수 x와 y 사이의 랜덤한 수 구하기는 아래와 같은 형식:
#$random = int(rand(y - x + 1)) + x;
========================================================
아래는 Cygwin에서 위 dice.pl을 실행한 것.
$ perl dice.pl
6
$ perl dice.pl
3
$ perl dice.pl
1
|