[Unity Game Development Tutorial: 12 : Turing Game: 3] - Theoretical/Design Discussion - no code or development

in turingtest •  8 years ago  (edited)

A Turing Test type game can be fairly simple or it can go to the extreme in complexity. In fact, it can go so extreme that it is something still being researched by computer programmers, engineers, neuroscientists, and more all over the world even to this day. The really complex ones are many hundreds of thousands of lines of code.

We are obviously not going to dive into it at that level. We are going to approach it from a game point of view. As such we are already close to being able to hit the Eliza level of game play. We will go beyond Eliza.

So to really go crazy I needed to have a post that discussed the non-coding aspects. Just the mental planning.

There are two tutorials so far that get us to near the Eliza requirements:
[1] - Setting up the UI so we can attach code and begin the game
[2] - Getting input, output, and simple parsing working

If those skipped some points on Unity and you need more information on Unity itself you might review some of these older tutorials
[2] - The basics - An Intro to Unity - Layout, Non-Coder, Coder
[4] - Coding Education Speed Boost - Coding Lesson 1 - also my naming conventions
[6] - Coding Lesson 2 - Some of those things you learn over time
[7] -Coding Lesson 3 - Code based texture creation - Mandelbrot Set
[8] - Coding Lesson 4 - Coroutines

I also made a two part post that is a Glossary of words for Game Development If you find some of the words are unknown to you there is a chance I may have covered some of them in those two posts.
Glossary of Gaming, Game Development, and Game Design Terms (Part 1 of 2 - Albedo to Mesh)
Glossary of Gaming, Game Development, and Game Design Terms (Part 2 of 2 - Metallic to Wav)


Source: giphy.com

None of these were designed to teach you to program. There are tutorials on the internet to help with that, and there is even one community member @charlie.wilson starting programming lessons in C++. Most of what he teaches carries over into C#. You won't be using pointers and such with C#, but there are other ways to achieve similar results. The person doing these programming tutorials is @charlie.wilson. I will link to some of his tutorials here in case you need to start there.
Easy Tutorial: Computer Programming
Easy Tutorial: Computer Programming (part 2) for DUMMIES
Easy Tutorial: Computer Programming (part 3) for DUMMIES
Easy Tutorial: Computer Programming for DUMMIES (not language specific) -- very helpful for beginners
Easy Tutorial: Computer Programming for DUMMIES (not language specific) -- beginner friendly
Easy Tutorial: Computer Programming for DUMMIES -- beginner friendly!
Easy Tutorial: Computer Programming for DUMMIES (p7) -- very beginner friendly!
Easy Tutorial: Computer Programming for DUMMIES (sorting)
Easy Tutorial: Computer Programming for DUMMIES (generating random numbers)
Easy Tutorial: Computer Programming for DUMMIES (colored text on your terminal)
Easy Tutorial: Computer Programming for DUMMIES (recursion made simple!)
Easy Tutorial: Computer Programming for DUMMIES (binary search)
Easy Tutorial: Computer Programming for DUMMIES -- very easy!

My tutorials assume that you already are comfortable with the basics of programming. I do have gamedev tutorials that are not programming oriented, but unless you are using blueprints in Unreal with visual scripting, or Playmaker or something like that in Unity then you will invariably need to program in order to do anything beyond a very basic game.

The Turing Test concept is almost completely code based. It is all in how you process the text.

Language Considerations


To do the Eliza level Turing Test programs you mostly need to make your program be able to handle as many different combinations of word phrasing that you can. It typically ends up as a very large if then else style structure and that is the direction we will be heading with the next one.

Source: giphy.com

I also like to mix in some random numbers for response to try to make it seem a bit more varied and realistic. Remember the goal of the Turing Test is to try to convince people they are talking to a person and not a computer.

You will see as we go on that initially we essentially consider words...

If the first word in the sentence is one of the following we can kind of guess at what type of phrases might be generated by it. We try to compensate for as many of those as we can.
I
I'M
MY
YOU
YOUR
YOU'RE - the above YOUR might be used as this too. Spelling and improper grammar intensify the complexity.
DO
WHERE
WHY
WHEN
SO
BECAUSE
HOW
IS
ARE
HI HELLO HIYA YO GREETINGS
CYA GOODBYE BYE LATERS TTYL
WILL
DON'T
CAN'T
CAN
GIVE
PLEASE
YES
NO
SEE
LISTEN
RIGHT
WRONG
JUST
BACK
COME
SHUT
OPEN
GET
TELL
TALK SPEAK
LISTEN
TASTE
EAT
DRINK

As you can see the more words we can think of for how a communication might start the better our simulation is likely to be. Keep in mind this will be faking it. You need to then for each of those consider combinations of the third, fourth, etc occurrences of words attached to those.

It can get as complex as you allow it to get. It should be noted that this is purely predictable if a person knows the rules and a person can trip this up easily. If you do a good job it can and likely will fool a lot of people. Remember, they simply need to think it is a real person.


Source: giphy.com

If you were making a Turing Test person that was a troll that actually would be pretty easy. They follow very simple techniques that can be mimicked. This is especially true since they fixate on TRIGGERING people as opposed to actually responding intelligently to what the person said. For this reason that might be a particularly easy program to make. The problem is that people likely would not enjoy talking to it much IF they thought it was a person. If they realized they were arguing with a program they might enjoy it quite a bit.

Further Down The Road


You can take this further down the road and have the computer start to build up a dictionary. It can learn words and assign them a number in it's dictionary.

You could then set your logic rules to be able to treat multiple numbers as the same number.

Source: giphy.com

It can get truly complex. Analyze some books, websites, etc and think about how you would get your computer to actually READ and respond to those things. All they are is text input.

Logic and Really Far Down the Rabbit Hole


You can take it really far and try to teach it how to identify nouns, pronouns, plural, possessive, person, place, thing, verb, adjective, adverbs and more. You could then try to come up with a system where it expands its own vocabulary without you having to touch upon this.

Source: giphy.com

It is unlikely we will cross that bridge in this tutorial series unless for some reason it becomes incredibly popular as that will be a large amount of coding.

I have in the past made a system that understood the following logical traits:
IS
IS NOT
HAS
HAS NOT
WANTS
WANTS NOT
DOES
DOES NOT
NEEDS
NEEDS NOT

You could then teach it by telling it something like the folllowing:
A human is a mammal.
A mammal is an animal.
A mammal has hair.
A reptile is an animal.
A reptile does not have hair.


Source: giphy.com

Then things like Is a reptile a mammal the program can attempt to actually answer. You can take it further than this, but you get the idea.

Setting up such things as that takes a lot of coding and may be beyond the scope of what this tutorial series will cover. It is my hope that I will provide you with the tools so you can venture down that path if you like.

How far down the rabbit hole we go will depend purely on interest level.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

i really like to design games i don t know how to do it in unity and unfortunatly my pc don t support the other programs

It just takes practice and starting simple. Start very simple if you have to.

ok thnks i ll definitly try

excellent congratulations

This post has been linked to from another place on Steem.

Learn more about linkback bot v0.4. Upvote if you want the bot to continue posting linkbacks for your posts. Flag if otherwise.

Built by @ontofractal