It just seems like Eliza!

It just seems like Eliza!

There is a story behind every contest win! I am sharing some of my experiences before I forget them :), hoping it would inspire some students. #conteststories

25th - 27th Feb 1993: I was doing my second year Engineering (Sophomore year) at GCT, Coimbatore. I loved taking part in competitions, primarily because I liked challenges, and I wanted to see how I fared against bright people from all around the country. I did quite well, but I must also admit I had an unfair advantage - I started programming very early, around 9th grade, while many of my peers only started during college.

One of the prestigious events was the one conducted by Anna University (College of Engineering, Guindy), called Abacus, in Chennai. I said prestigious because it was the #1 institution in the state apart from the IITs.

I signed up for two contests - 1) Impromptu software contest, where you are given a specific time to build something that works, and 2) Software demo contest, where you demonstrate software that you had built earlier, in front of a large audience.

When I read the problem statement for the impromptu software contest, I was a bit flummoxed. It just read:

No alt text provided for this image

Just a one-liner! Such a simple statement, but so difficult to implement properly, and it has to be done within 2 hours! How do you write something like that? I thought. It seemed clear they are looking for participants to think broadly and come up with something that works reasonably well (If you were given this problem, what would you do? Comment below. I would love to know!).

I was pondering what to do, and something that I had read about popped into my mind. It was Eliza - the first AI chatbot! I had read that even though it was a very simple implementation, it tricked people into thinking they were interacting with a Psychiatrist. Here is a screenshot of an Eliza implementation:

Screenshot of an Eliza implementation.

So I thought, maybe I should make something like Eliza. I really didn't know about the specifics of what questions it asked, responded to, and how it was implemented, etc., but in the back of my mind, I thought it should be something like Eliza.

At that time, my language of choice was Turbo Pascal. I had started off with BASIC, and picked up some Z-80 Assembly, tinkering with my home computer. However, I fell in love with Pascal when a friend of mine brought me a floppy loaded with Turbo Pascal 3.0. I was so happy to be able to generate a .COM file (executable) that I can pass on to my friends. They could just run it without a need to have a compiler or interpreter! When you go to a competition, they would provide a PC with a few languages pre-loaded. Turbo Pascal was one of the choices almost everywhere.

I started off by tokenizing the input, i.e., breaking down the sentence into words. Then I remember making a crude attempt to identify the sentence structure, noun, verbs, etc. I was just looking for keywords such as "name", "how are you" etc., and crafted generic responses. This approach is fine for some introductory conversation, but the challenge was how to make a prolonged conversation. It occurred to me that taking them to a game would make it go longer. But what game shall I make?

Have you played the number guessing game? I would ask you to guess a number between 1 and 100. I will then ask you if it is greater than 50. If you say yes, then I will ask if it is greater than 75. If you say no, I will ask if it is greater than 62. You get the idea. It is basically a binary search to find the number within 7 attempts. I think I programmed two such games. I forgot what the other one was.

After 2 hours, it was judgment time, and the judge visited my station and she started typing:

No alt text provided for this image

My code replied

No alt text provided for this image

She then typed,

No alt text provided for this image

I forgot her actual name, so I have put xyz instead above. My code replied:

No alt text provided for this image

Did you notice the name replacement? She then typed,

No alt text provided for this image

My code replied:

No alt text provided for this image

At this point, she exclaimed, "It just seems like Eliza!". Yes! It was exactly what I wanted! I knew at that moment I was going to win. She then went on to play the guessing game, then quizzed me if I knew about Eliza. I sheepishly admitted that I did and that I wanted to program something similar for the contest.

The Verdict

I won the first prize. I am not sure how much I won, but during those times, the prize money for 1st place was typically Rs. 750 or Rs. 500, which was a lot for me :)

No alt text provided for this image

I mentioned I also took part in another contest in the same event - The software contest. Do you want to know what happened? Comment below!

new melchizedec sundararaj

Founder - Expertrec search engine, ex-Googler

3 年

thanks for sharing this raj, very inspirational. And, congrats for winning!

Quasar Chunawala

Quantitative Engineer at Goldman Sachs

3 年

So so cool, and what a thrill!

Suntrakanesh Subramanian

Engineer at Micron | Alumnus of GCT

3 年

Looking forward to know about software contest !

Sylvester Rajasekaran

Principal Platform Performance Architect (PMTS) (Software)

3 年

Raj Madhuram Good experience indeed what you had and I used to work on Turbo Pascal back in '90 then COBOL and Pro*C, but similarly not to your sophisticated Eliza, we as a group wrote a program on LISP programming back in '91 as an experimental. Worked to an extent. ?? Good old days.

Utkarsh Kumar Raut

Poet on terminals compiling dreams.

3 年

? I wrote C++ application as HTML blog maker with built-in FTP-client to host it to freeorg type of hosting services. Took inspiration from BlueVoda and tried to made blog writing software as .EXE. ? Had 5 built-in themes to choose & XML theme designer. ? Program: BSP Inter-school Competition & year was 2011/12. Won 1st prize with team — such the amazing innocent memories. Thank you for your post, just revisited those older good times! PS: Why this Kolavari Di was just released and was in the ears for most of time with Linkin Park` The Catalyst.

要查看或添加评论,请登录

Raj Madhuram的更多文章

  • Voronoi Art with Generated Points

    Voronoi Art with Generated Points

    A Voronoi diagram is a partition of a plane into regions close to each of a given set of points in the plane. There are…

    2 条评论
  • Getting Started with Graphics Programming

    Getting Started with Graphics Programming

    Drawing things on a computer is really fascinating. In fact, it was one of the first things I figured out to do when I…

    10 条评论
  • Why Coding Skills Matter?

    Why Coding Skills Matter?

    In this era of plug and play, copy/paste programming, many programmers do not take the time to hone their coding…

    23 条评论
  • Header Bidding on the Rise!

    Header Bidding on the Rise!

    Today out of curiosity I was checking the trends on how header bidding is being adopted by Publishers. I was looking at…

  • Header Bidding Explained

    Header Bidding Explained

    Header bidding (also known as pre-bidding) is a term in the ad industry that is gaining a lot of momentum. In this…

    4 条评论

社区洞察

其他会员也浏览了