megahal
1.0.0
MegaHAL은 학습용 채터봇입니다.
명령줄 애플리케이션으로 실행하거나 자신의 애플리케이션에 포함하고 간단한 API를 통해 호출할 수 있습니다. 예를 들어 MegaHAL과 온라인으로 채팅할 수 있는 megahal-server 저장소를 참조하세요.
이는 간단한 확률론적 예측 모델인 Sooth를 기반으로 구축되었습니다.
MegaHAL의 새 버전은 제가 약 20년 전에 쓴 원본에 경의를 표하여 작성되었습니다. 이러한 상황에서 Ruby 버전은 원래 C 버전 크기의 일부에 불과합니다.
내가 가지고 있는 MegaHAL의 가장 오래된 기록은 1995년 4월 30일의 USENET 게시물이며 이 README 하단에 재현되어 있습니다.
MegaHAL의 명령줄 버전을 실행하는 것은 간단합니다.
> gem install megahal
> megahal
+----------------------------------------------------------+
| |
| # # ###### #### ## # # ## # |
| ## ## # # # # # # # # # # |
| # ## # ##### # # # ###### # # # |
| # # # # ### ###### # # ###### # |
| # # # # # # # # # # # # |
| # # ###### #### # # # # # # ###### |
| |
| Type "/help" for options and "/quit" to terminate. |
+----------------------------------------------------------+
Greetings and salutations to thee and thine.
>
프롬프트에 /help
입력하면 메뉴가 표시됩니다.
1. cancel
2. reset
3. brain
4. train
5. load
6. save
7. ignore
8. quit
메뉴 항목의 번호나 이름을 입력하여 선택합니다.
cancel
: 선택하지 않고 뒤로 이동reset
: MegaHAL의 뇌를 비워서 백지 상태로 복원합니다.brain
: 기존의 여러 성격 중에서 선택합니다(아래 참조).train
: MegaHAL에 학습할 일반 텍스트 파일을 제공합니다.load
: 파일에서 이전에 저장한 두뇌를 로드합니다.save
: 현재 MegaHAL 두뇌를 파일에 저장합니다.ignore
: MegaHAL이 사용자 입력으로부터 학습하는 것을 방지합니다. 뇌에 변화를 주지 않고 채팅하고 싶을 때 좋습니다.quit
: 즉시 MegaHAL을 종료하고 저장되지 않은 변경 사항은 모두 손실됩니다. 위의 brain
메뉴 항목을 선택하면 선택할 수 있는 기존 MegaHAL 두뇌 목록이 표시됩니다.
cancel
: 선택하지 않고 뒤로 이동default
: 1998년 Loebner 대회에 사용된 성격aliens
: 외계인의 주교!ferris
: 페리스 부엘러 씨가 직접! 부엘러! 부엘러!pepys
: Samuel Pepys, @samuelpepys 트위터 피드에서 가져옴pulp
: 펄프픽션의 마셀러스 월레스!sherlock
: 셜록 홈즈, 모든 책에서 인용문 포함startrek
: Star Trek의 데이터(mbaker 덕분에)starwars
: 스타워즈 3부작의 쓰리피오! 다음은 megahal.log
파일(MegaHAL과 상호작용할 때마다 기록됨)에서 직접 가져온 대화 기록의 예입니다.
(brain changed to sherlock holmes)
MH10: On the strange coincidences, the plannings, the cross-purposes, the wonderful chains of events, working through generations, and leading to the composition of a woman.
USER: Who are you?
MH10: You could never guess how I employed my morning, or what I ended by doing.
USER: Did you play a game?
MH10: Come, Watson, come! The game is afoot.
USER: How exciting!
MH10: Isn't it gorgeous! What do you think of it.
USER: I think it's great. What are we going to do?
MH10: I think, perhaps, it is simplicity itself.
USER: Tell me then.
MH10: Your statement is, I want you?
USER: Ummm... no.
MH10: Yes, certainly.
USER: I think you're confused.
MH10: I think that you have been too busy to think of it.
USER: Are you saying what I think you're saying?
MH10: You know how to look into it.
USER: So do you by the sound of it.
MH10: I have been of material assistance to me for fifty minutes.
USER: Is this non-stop double entendre?
MH10: More than that it is a great thing for me to be able to understand that I have ever listened.
USER: Let's go and do something. Or get a bite to eat.
MH10: That is interesting.
USER: Why?
MH10: Because there are fifty who can reason analytically.
USER: Name them.
MH10: My name is Sherlock Holmes.
USER: And who are the other forty-nine?
MH10: I want to ascertain.
USER: You mean that you don't know?
MH10: Light a cigar and let me see if I can do what you have told me I think that both inferences are permissible.
USER: Well, it's been interesting. I must leave.
MH10: No crime, but a very interesting statement.
USER: Goodbye.
MH10: You must get home instantly and act.
MegaHAL Stopped
Have a weird conversation with a computer
-----------------------------------------
Recently I added a feature to my home page allowing the user to "talk" to a
computer program of mine. The program was not written very intelligently, so
most of the time its replies consisted of incoherent babble.
Version 2 came and went, and now version 3 - MegaHAL - is ready for release.
The new features of the program are:-
* A second-order markov model is used, and it is doubly-linked. This
means that the computers sentences tend to be more grammatical.
* Punctuation is supported, which segments the sentences realistically.
* The reply given by the computer is based upon one of the words in
the input string. The word selected is one that maximises the ratio
(number of times since word was last used)/(number of times word has
appeared).
* The computers reply is generated from this keyword, and may be up to
100 words long. The reply is generated in such a way that it is
impossible to get stuck in infinite loops.
* The keyword used is highlighted in the reply.
Some example conversations are given below:-
USER: you are crazy
HAL: WE *ARE* WEIRD.
USER: What is the meaning of life oh wise one?
HAL: *LIFE* IS THE ROOM.
USER: this is not getting us very far
HAL: YES I AM *GETTING* BORED OF GLOBAL DOMINATION.
USER: I have no idea.
HAL: *NO* IT IS IN HEAVEN.
USER: Is it really?
HAL: YES *IT* IS.
USER: My name is Jason.
HAL: I THINK ALAN TURING WAS A GIRLIE, JUST LIKE *MY* DEAR MAMA
The last response was generated from a combination of a discussion
about Alan Turing, and Monty Python's Lumberjack Song. Surely this
must be a sign of intelligence ;^)
Have fun!
저작권 (c) 2018 Jason Hutchens. 자세한 내용은 UNLICENSE를 참조하세요.