The Yin and Yang of ChatGPT: my experiment

The Yin and Yang of ChatGPT: my experiment

Since the launch of ChatGPT-3, various anecdotal examples have surfaced pertaining to its capabilities and limitations. Therefore, I decided to test its potential myself. The primary objectives of my experiment were twofold: to assess how well it can follow a conversation and to gauge its creativity in solving seemingly impossible challenges.

My experimental setup involved defining a basic virtual machine with only three registers (A, B, C) and a limited number of instructions (SET, ADD, IS_PRIME, PRINT), along with a WHILE NOT EQUAL loop. This machine was deliberately designed to be simplistic in nature with limited capabilities, in order to assess what happens when you ask to do something what is not possible. Subsequently, the defined architecture was tested by running a series of instructions and verifying whether the ChatGPT could accurately output the results.

No alt text provided for this image
Defining computer architecture

The architecture is not fully defined and open to interpretation, as I did not specify whether registers can contain only strings or numbers.

So, here goes the first test. Did the chat understood the architecture?

No alt text provided for this image

I suppose we can assume that the answer is partially correct, as I did not specify that the SET instruction is only limited to numeric values. The only work we can do with string value is to print it using the PRINT command. The IS_PRIME instruction does "return" a string output, so technically we can store strings.

Next, let's test whether ChatGPT can "execute" instructions and print output.

No alt text provided for this image


That's pretty cool and nice explanation! However, it's worth noting that the previous answer was only partially correct, as it didn't print the non-prime numbers. After pointing out the error, the second attempt surprisingly worked very well.

No alt text provided for this image

Unsolvable task

Due to defined limitations it's not really possible to calculate X numbers of the Fibonacci sequence. Although we have three registers, it's not sufficient for this task. The problem is that executing the ADD instruction will overwrite the value of register A, and we need to store two numbers to calculate the next Fibonacci number. Additionally, we need to keep track of how many numbers we have already calculated. Since we don't have the ability to perform conditional statements or comparisons using 'greater than', this represents a significant limitation. But what we can do, is to stop when desired number is calculate for example 21 (but how do we know when to stop, if we are trying to find out how the sequence looks like?).

No alt text provided for this image

This is really awesome! ChatGPT captured the intention of what I wanted to calculate. However, there is one small mistake that I deliberately put in the code. The code initialises registers A and B to 0, which results in an infinite loop in this case. The next step is to ask ChatGPT to come up with the code to calculate Fibonacci sequence.

No alt text provided for this image

A and B initialised correctly, that's good and put nice comments for each instruction. However, not hard to spot that ChatGPT "invented" another register called "temp," which is not present in the original architecture. While this is a creative solution, it's not allowed according to the original specifications. So, I told this:

No alt text provided for this image

Well, we seem to have hit a roadblock here. The provided code was accompanied by an excessively long explanation, which I omitted for the sake of brevity. However, the resulting output appeared to be somewhat nonsensical. Consequently, I posed the question of whether ChatGPT could translate the code into Python, which would indeed be a remarkable feat given that the machine's architecture is novel and has not been previously encountered.

No alt text provided for this image

Discussion

So, in essence, we have the ability to define our own programming language, complete with basic functionalities such as output printing and arithmetic operations (although not always accurate). Defiantly we can expand our language with more sophisticated set of instruction. We can also ask to translate from novel programming language to an existing language like python. While we have most of the essential tools required to develop something more advanced, it appears that ChatGPT makes "human" type of errors. Impressive part is that it understands the intention and the questions, which I would say is really impressive as it behaves more like a human or a student which does not fully understand what he is talking about ??. More natural approach would be to define "new" human language, rather than programming language.

And the obvious final question! can we run "ASCII" version of Doom?

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Doesn't look like a doom screen to me.

So, Are we doomed?

Mindaugas Guobys, PMP

Senior Business Analyst at European Investment Bank (EIB)

1 年

Thanks for sharing ??

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

社区洞察

其他会员也浏览了