Show Posts
|
|
Pages: 1 2 [3] 4
|
|
43
|
Community / DevLogs / Re: Growbot
|
on: February 10, 2017, 12:54:31 AM
|
This is amazing! You had been able to do so much alone. How long have you been working on this? Your art is very inspiring too, wish you all the best with this project 
|
|
|
|
|
44
|
Community / DevLogs / Re: Kikai
|
on: February 08, 2017, 11:45:57 PM
|
Teach the kids English (Part 2) IntroductionI have come up with a “plausible” language system design and have been working on it. I start with recognizing sentence types (normal sentence, question and order) using a Neural Network with Batch Gradient Descent. System DesignThis system’s goal is to simulate smart chatbots. It takes a sentence as input and is expected to produce a reply as output. For example: - Input: What band do you like? - Output: I like Pantera - Input: Any others? - Output: I’ve been listening to Iron Maiden too, they’re solid. The player will produce input by typing into a textbox and the kids will reply. Since we want the kids to remember the context of the current conversation, their relationship with the speakers, as well as inserting their own opinions, feelings and thoughts into their interactions, a simple sentence by sentence matching system won’t work. Instead, I will run the input sentence through a few different neural networks and functions to extract a bunch of useful details. These details will then be combined with the context object, the kids’ personality and state objects to construct a reply. A small taste of MS PaintWe will want to extract the following details; - Sentence type (Normal sentence, question, order, etc) - Question type (Ask for reason, fact, mean/way, etc) - Main subject - Main object - Main verb - Main adjective … For example: 1. What is your name? - Sentence type: question - Question type: fact - Main subject: listener - Main verb: be - Main object: name 2. He loves cake- Sentence type: normal sentence/inform - Main subject: he - Main verb: love - Main object: cake Recognize sentence type with Neural NetworkI will demonstrate my steps building a neural network which can recognize the sentence type of the input in this section. Since many things are still unclear to me, any suggestions, corrections and clarifications are well appreciated. I also believe this article is a good start. If you’re familiar with Neural Networks and interested in smart chatbots in games. Feel free to go along! Step 1: Define the Neural NetworkI split the input sentence into words, instead of characters or chunks of data so I could control the vocabulary of the kids. The “?” and “!” mark are each counted as a single word.. The maximum number of words an input can hold is 15. That should be enough to cover most “meaningful” sentences in our game context. So we will set the size of the input layer to 15. Observation: If our date set is large enough, reducing the size of the input layer to around 10 won’t improve our algorithm performance much! The output layer will have 3 neurons, used to classify Normal sentence, Question and Order. I use Sigmoid function and 6 hidden neurons in a single hidden layer. The Neural Net model without bias neurons Step 2: Generate and process DataWe can easily build a list of common nouns, verbs, adjectives then write a program to generate normal sentences, questions and orders from these words. My current data set has 500 sentences, which I mostly generate by hand and copy-pasting patterns. It’s easier to manage for now. normal.txt | questions.txt | order.txt | Because I am tired Clean food is good Dinner is ready Food need to be clean Goodbye He is bored ...
| Are you alright? Are you fine? Are you happy now? Are you hiding something? Are you hungry? Are you okay? ...
| Admit it Answer me Be careful Be quiet Be yourself Beat it! ...
|
You can get the full data set here. I then read the sentences from the files, extract words from them then fetch into a std::map like this: std::map<std::string, int> words; ... if (words.find(newWord) == words.end()) { words.insert(std::make_pair(newWord, words.size()); } So now each word is labeled with a different number. We can then transform the input sentence into a std::vector of these numbers to fetch our Neural Net. I thought of 2 different ways to order the words: Either place the words right at the head: [ what, is, your, name, -1, -1, -1, … ] or in the middle: [ -1, -1, -1, -1, what, is, your, name, -1, -1, … ] I quickly tested both version and their performances are pretty close if our data is large enough. Placing the words in the middle seems quite interesting but the first way feels more stable to me. I then perform a simple feature scaling. I don’t know what is the best way and why not doing this hurts the algorithm a bunch. For now, I’m simply dividing each number in the vector by the number of known words: res[i] /= words.size(); With that, we have been able to set up the training data. A training case should look like this: - input: { 0.317073, 0.198171, 0.131098, 0.344512, 0.0121951, 0.0152439, 0 0 0 0 0 0 0 0 0 } // What is your name? - output: { 0, 1, 0 } // Question We can also write a simple function to auto-correct unknown words, like “wat” -> “what”, and transform plural nouns to singular, singular verbs to plural (“dogs” -> “dog”, “eats” -> “eat”), etc. More on this on upcoming articles. Step 3: TrainingWith the data ready, I train the Neural Net with Batch Gradient Descent. Since I have very poor data, only 500 sentences for 328 different words, I have to run Gradient Descent with a small learning rate (0,025) for 600 iterations! The result is below, which can be said to suffer from both underfitting and overfitting (What???). I couldn’t even reach 80% accuracy on the training set, need better data! Excuse me if you could see “Neuron Network”, I was not really brightI’ve also recorded a video inspecting the trained neural net. Check it out 
So I’ve been able to create a neural net that works, but not well. It can’t fit the training well enough, reaching only 77%~79% accuracy on different runs. I will start working on the data first, then tackling more minor problems that I’m still unsure of. Like trying different hidden layer numbers and sizes, tweaking the learning rate, etc. Again, I will be very happy if we can form a group working on smart chatbot, not specifically for Kikai, but for games in general. Any comments, corrections, suggestions and questions are well appreciated. Anyway, of the 5 problems that I’ve mentioned in the first article, this article only touches a small part of the first one, many more discussions are coming soon, stay tuned  ! ReferencesOnline courses for Machine learning: 1. Machine Learning, taught by Andrew Ng2. Neural Networks for Machine Learning, taught by Geoffrey HintonImplementing Neural Networks in C++ 1. Tutorial Video2. Detailed Article with Source codeNow you're just teasing  This is awesome! More please  Thanks a lot man! More concept art coming soon  !
|
|
|
|
|
45
|
Community / DevLogs / Re: Kikai
|
on: February 07, 2017, 04:57:24 PM
|
Your art is crazy awesome  Thank you very much, this is a little present for you  ! 
|
|
|
|
|
46
|
Community / DevLogs / Re: Kikai
|
on: February 05, 2017, 06:34:56 AM
|
Teach the kids English (Part 1) IntroductionI have been trying to develop a system where the player can teach English to Kai and Kira. And after skimming through some research papers about natural language processing, chatbots,... I was truly intimidated and depressed. I was afraid that it would take me years of study just to understand how to make a “state-of-the-art” natural language processing system. I soon came to a conclusion that I was too systematic, instead of being creative. Why search the whole net for academic articles when my goal was not to create an AI that can discuss philosophy? Making games is so much different from solving real life problems. We can define our own rules, most sloppy logic are plausible. I was coward for being afraid of creating “not good enough” systems. We have to be creative. Game systems are fine as long as they work. So while I would not stop exploring Machine Learning and other intermediate AI techniques, I’m going to start humble and naive here with my own language processing system. Enjoy! Background & GoalsWe want the kids to learn English so they can communicate better with the player. The player talks to them by typing sentences into a textbox, instead of choosing from scripted options. The kid will reply if they can grasp what the player said. Below are some of the conversations we want to achieve: 1. Simple Q&A- The player: What’s your name? - Kira: Kira - The player: Do you like my dishes? - Kai: No Since the kids are new learners, we can allow them to ignore grammar. By training them with neural networks, they will interpret sentences by patterns rather than by grammar rules and structures. So the following conversation is still plausible: - The player: What you name are? - Kira: Kira Both native speakers and new learners should be able to interpret “What you name are”. Native speakers, young people “deliberately” use wrong, ignore grammar all the time. That said, we still need to keep patterns under control, “You what are name” should be interpreted as nonsense. This can be done by creating training data by hand. 2. Q&A with more context- Who are the dead people? - Why did you kill the female scientist? - Where is that doll from? These are the questions that help the player gather valuable information to unfold the mysteries in the game. The player is free to come up with all kind of questions. The kids will answer the ones that they can understand. Tell the kids to study English everyday if you’ve come up with some critical questions that they have not yet understand. 3. Instant Enquiries, Ask for help & Planning- Are you hungry? - Where is Kai? - What kind of stories do you want to hear next? - We’re running out of water, do you want to go get more tomorrow? - Do you want me to play some music for you now? - Can you help me find some batteries in the other rooms? - Put the clothes on the floor back into the closet - It’s still early, go read some books The kids will answer, act differently, depending on their states and other conditions. 4. Behaviours, habit and manner related- Please don’t go out alone next time - Don’t talk to strangers - Put the book back to its shelve after reading it. 5. Casual conversations- The player: What is your favorite band? - Kira: Pantera. - The player: Ah okay. They’re great and all, but have you listened to Iron Maiden? - Kira: No. Tell me more about them. Are they metal? 6. Conversations which the kids start- You look tired, are you alright? - Have you taken your pills today? - What will we have for dinner? - Do you even have a name? 7. Complete nonsense - The player: Kai, how much wood would a woodchuck chuck if a woodchuck could chuck wood? - Kai:  - The player: Hah! - The player: Kira, how much wood would.... - Kira: Shut Finally, our main goal building this system is to help the main characters communicate and interact better. So instead of a system that relies heavily on complicated patterns and grammar rules, we will focus on the kids’ personalities and their understanding of the world around them. How the kids “feel” and interpret a word is more important than that word’s formal definition in a dictionary. As long as talking to the kids is fun and informative, we’re solid. So we will have to come up with creative and effective ways to represent words, objects, events, relationships, etc for the kids to understand as well as getting better at understanding. Since we don’t want the kids to know everything right off the bat. Problems to solve1. How can the kids learn patterns to interpret what the player says? 2. How can they build up their own expressions, answers? 3. How can they remember the context of the current conversation to maintain a consistent one? For example: - The player: What is your favorite band? - Kira: Pantera. - The player: Any others? Kira is expected to know what do others refer to so a simple sentence by sentence algorithm is not good enough. 4. How can they maintain consistent memories? To avoid: - Kai: Carl, let’s go! - The player: I’m not even Carl. - Kai: Paul, let’s go! - The player: I’m not Paul, and we just agreed to stay home 2 minutes ago. - Kai: Nevermind then, Carl! Again, a simple sentence by sentence algorithm won’t work. 5. How would the conversations affect the kids? If they do, how? Will the kids learn new things from the conversations too? I will tackle these problems and update their status with each development log. More problems, suggestions and directions are well appreciated! How the kids learnThey will mostly learn the language through books themselves. The player can help them study or tell them to, but they will mostly study on their own. The books the kids learn from have different chapters. Each chapter brings more knowledge, which help improve their English and other skills. This gradual learning works well because it does not require huge data right off the bat. They both start with English starter books for kids. When they reach a certain level, the player can show them more kinds of text. It can be some moral short stories, simple cooking recipes, etc. The kids will grow differently if they are given different texts, in different orders. Their levels differ too, Kira will likely to spend more time studying so she will get better faster than Kai. The player will first teach the kids the alphabet and numbers by clicking a button and everything is done. A mini game for this might be okay but is unnecessary for now. Programming, DemoWill be demonstrated clearly from the next part. References, inspirations1. Natural Language Understanding: Foundations and State-of-the-Art2. Making a chatbot that drives a narrative in sci-fi exploration game Event[0]3. Deep Learning for Chatbots, Part 1 - IntroductionP/s: Please forgive me for making dumb English mistakes while trying to teach the language itself to AIs On a side note, our 3D artists have been working hard, pumping out new models everyday! We will start showing stuffs once ready. Our composer has also recorded some really cool demos, the light novel is doing well and more concept art will be published next week, stay tuned  !
|
|
|
|
|
48
|
Community / DevLogs / Re: Kikai
|
on: January 28, 2017, 02:46:10 AM
|
We're very happy to announce that Enmanuel has joined us as a 3D Artist. More news coming soon, cheers guys  !
|
|
|
|
|
50
|
Community / DevLogs / Re: Kikai
|
on: January 27, 2017, 04:09:33 AM
|
Good day everyone, we have finished and finally published the first chapter of the light novel, you can check it out here. We have also launched our Facebook and Patreon. Please share the game with your friends if you like it  ! More news coming soon  ! 
|
|
|
|
|
51
|
Community / DevLogs / Re: Kikai
|
on: January 25, 2017, 07:53:14 AM
|
We're very happy to announce that Josh has joined us as a composer. He's going to work on a special track for the game soon. The story behind the track and more details will be revealed once we have a demo to show  We're also very close to finish the first chapter of the light novel and still looking ceaselessly for more 3D Artists. Hope everyone's doing fine as always  .
|
|
|
|
|
53
|
Community / DevLogs / Re: Kikai
|
on: January 23, 2017, 05:11:37 AM
|
Interesting concept art and plot! Definitely try to get some 3D artists on board before you quit your job though, it sounds like you need to flesh out the prototype a bit more and see how it develops before going all in.
Thank you for your comment and advice, we're still looking ceaselessly for some more 3D Artists and definitely improving the prototype. Anyway, we're very happy to announce that Lucas has joined us as a 3D Artist. More news coming soon, cheers guys  !
|
|
|
|
|
54
|
Community / DevLogs / Re: Kikai
|
on: January 22, 2017, 08:44:12 AM
|
I have updated the Kai's bravery prototype post so if you're interested in AI, check the #3 post of the thread! We're going to introduce our first 3D Artist soon too while the first chapter of the Light Novel's also doing well. Cheers guys  !
|
|
|
|
|
55
|
Community / DevLogs / Re: Kikai
|
on: January 19, 2017, 08:13:18 AM
|
Nice art bro!
Thank you so much man! Anyway, we have luckily found our proofreader and editor, Jaco! He's started working on the Light Novel's first chapter right away so the complete version should be up soon  We're still searching for 3D artists so if you're interested, contact us at [email protected] 
|
|
|
|
|
57
|
Jobs / Collaborations / [Rev share]English proofreader for Kikai
|
on: January 17, 2017, 06:34:47 PM
|
Hi there, everyone. I'm Hai, the programmer and writer of Kikai - a dark themed mystery, action 3D game with great focus on story and AI. Since the game focuses heavily on story, with tons of mysteries and tiny details for one to discover, we always try our best to avoid spoilers. We’re going to demonstrate the game world and share some stories through a light novel written specifically for the game. A chapter or two will be published every month. We’re not going to spoil much and might even insert some lies and misleading clues. The point is to make sure everyone can feel the game better and imagine what kind of mysteries there are. One will have to play the game to truly understand the characters and mysteries. The problem is that I find my English writings suck. We need someone who could proofread the Light Novel as well as help improve the writing style. It's going to be very convenient too if that person could also help with the in-game texts. You can take a quick look at my (horrible) English writing skill through the first draft of the Light Novel here. This is a rev share position but since we don't have any money, we can't promise anything just yet for the next 2 months. We're thinking of launching a Patreon for this Light Novel soon so if it works out, no one's going to work for free. If you're interested, please contact us at [email protected]! Any suggestions to improve the development of this Light Novel are also well appreciated.
|
|
|
|
|
58
|
Jobs / Collaborations / [Rev share]3D Artists for Kikai
|
on: January 17, 2017, 04:11:38 PM
|
Hi there, everyone. I'm Hai, the programmer and writer of Kikai - a dark-themed mystery, action 3D game with great focus on story and AI. We need someone to work as a character artist and animator and another for static props. Although knowing what kind of atmosphere we want to deliver, the 3D art style is not yet decided nor fixed, you will be able to truly enjoy your creative freedom when working with us. Our main problem is that we currently don't have any money. We're targeting Unreal Dev Grants, IndieGoGo and Patreon right now but could not promise anything just yet, at least in the next 2 months. So we're not in the position to put out requirements here, if you have some spare time, patience, dedication and interest, please contact us at [email protected]! Finally, we're using Unreal Engine 4 and these are some sketches prepared for our future 3D Character Artist: https://www.dropbox.com/s/vjij6vt82gppl61/main9.png?dl=0https://www.dropbox.com/s/71czt1z4xb6v7d8/main12.png?dl=0https://www.dropbox.com/s/9sx7i5wzin6ssoq/main13.png?dl=0Have a good day guys!
|
|
|
|
|
59
|
Community / DevLogs / Re: Kikai
|
on: January 17, 2017, 07:52:23 AM
|
Kai's bravery SummaryKai learns how to react to enemies from the way the player reacts. He could either be brave, always confronts the enemies without fear or could simply be a coward, just runs away all the time. This bravery of his depends on how the player plays the game. PrototypeAt the beginning, Kai is coward in general. His coward level is randomly generated though. For some players, he just runs away all the time. For others, he might actually choose to confront the enemies when in real danger.  (a rather brave newborn Kai)  (a not so brave newborn Kai) The bravery level B varies from 0 to 1. Kai is bolder when B is closer to 1 and tends to run away when B is closer to 0. The cool thing is that this bravery level B differs with situations. Kai won’t just either run away or confront the enemies all the time, he might run in one situation (the enemy is still very far) and confront in another (the enemy has already come close). Now let’s see how Kai grows! - With an aggressive player, Kai's bravery might change like this:  >> 
- With a rather shy player, Kai's bravery might change like this:  >> 
A more balanced player will help Kai grow the bravery level B to around 0.5 for different situations. We could also easily expand Kai's observations to base his decision on, not only how far the enemy is or has it detected Kai or not, but also what kind of weapon the enemy’s holding, how threatening it is, is there a closet nearby... The number of decisions could also be easily expanded, adding the options to hide in a nearby closet, setting up traps, etc. Note that this model is only for Kai's bravery, not Kai's aggressiveness, since Kai can either knock the enemy off, put it to sleep or kill it when confronted. Kai's willingness to kill is then another model, influenced by the player and different situations. These models can link with each other and by designing different models like these, we could develop really deep and realistic AIs. These models also have a learning rate and a momentum used to define how fast the AI learns. So we can control how fast Kai grows or is influenced. For example, killing the first person will make killing a second one easier, while sparing a life or two won’t really make one less likely to kill. A few runaways also won’t immediately turn someone into a coward. ProgrammingUse a simple Neural Network with Stochastic Gradient Descent. Implemented using classic OOP classes without matrix multiplication, since importing libraries into UE could be heavy, buggy and anti cross-platform. Also, implementing my own Neural Network helps boost my understanding of it, which is still quite low. To do: Optimize the Neural Network code, make sure SGD works well with data gathered real time in game. Learn more Neural Network, Gradient Descent & Machine Learning techniques.
|
|
|
|
|
60
|
Community / DevLogs / Re: Kikai
|
on: January 17, 2017, 07:41:12 AM
|
You can read all chapters in better format here, first time loading the site might be a bit slow though  Prologue During his gradual recovery from a chronic disease, a musician and luthier had traveled to a beautiful foreign land. Just to get away, relax in scenic beauty, and maybe find some musical inspiration. He left the crowded, distracting cities to travel all the way to a border town so he could enjoy the best sceneries there were. Then the war broke out. Everyone lost their minds and chaos ruled. In the midst of all this, he found a boy with a broken leg, crawling against the stream of people running away from the fighting. He couldn’t just leave the poor boy. He tried to pull him away from danger, but the kid showed him a picture of a girl and pointed deeper into town. With haste, he helped the boy get to where he wanted to go: a large laboratory. There was screaming coming from the inside. They followed the sounds deeper into the building until they encountered a small girl stabbing a female scientist to death. The girl passed out and the boy crawled to her immediately. There were three corpses at the scene, two in white lab coats. A picture on the wall showed the dead people and the two kids, all happy and smiling. The musician was still shell-shocked, but with the war outside, dangers were already on the doorstep again. He took it upon himself to protect the kids from the war. The boy’s name was Kai and the girl’s was Kira. They showed him the few underground lab rooms that they had access to, and the three of them made it their home while the war raged on outside. #1: Ink Yet another day on this horrible battlefield. With those same eyes, with that same face, Kira has killed again. We were just out on a quick supply run when some young men jumped us. I couldn't stop her in time. Kai didn’t react much; he must be used to it by now. I know that I’ve got to do something to fix this, but the whole situation is just too overwhelming for me to handle. The stabs of pain still haunt me every day, even though the disease has stopped getting worse. Before I got sick, I once had to babysit my brother’s kid, so he and his wife could enjoy a holiday somewhere on the coast. The boy was well behaved. He always listened to adults and was perfectly polite. Yet just taking care of him for one day was more exhausting than a 16 hour shift at the factory. Now I’ve got two strange kids to take care of. They don’t even speak my language. And the days just seem to go on forever. Kai and Kira have already entered the basement, but I’m still here playing my violin in the light of this melancholy sunset. There was a big battle in the east earlier this morning, so it’s been quiet for a while now. I just don’t want to miss the chance to play some music out here, in nature. I don’t think I’ll ever get another opportunity. I choose a peaceful Baroque song I’ve just learned to play. I chastise myself for the horrible tempo. Even though I know that the soul and character of a song comes from imperfection, I still want my performances to be perfect. I can always move along with the music if I want more emotion. But this sloppy tempo is just too painful to listen to. What a horrible day this is. I sigh, carefully putting the violin back inside its case. I plod up the handful of steps to get inside the house. Ink?On the way in, I find a multitude of dark splotches that look like blood, but smell strongly of ink. They’re scattered all over the floor, but they seem to lead somewhere. I carefully follow the marks. They lead to the bodies of the two scientists who had been living with the children. I try to hold back my lunch as I look at the gaping holes where the chests of the two scientists have been torn open. Empty cavities stare back where their lungs and hearts should have been. Around the wounds are sharp and decisive bite marks, as if a huge beast had ripped the scientists open and eaten their innards. There are no blood stains around the corpses. Only ink marks. Hundreds of them, scattered violently all around the room, like some kind of macabre modern art painting. None of the dark purple-black marks are spatters of blood. Did the beast lick up every last drop? Suddenly the danger of the situation sinks in, and I immediately run to Kai and Kira. Thankfully, they’re still safe, but there’s no time to waste. I quickly lock all the doors, then recheck every corner of the rooms. After having checked and rechecked everything to make sure the rooms are safe, I catch my breath and finally feel a sliver of relief. We have dinner in silence. I make sure the kids have brushed their teeth and then go lie flat on my back. I soon fall asleep. I wake up after a dreamless night, feeling tired and empty. Kai is still fast asleep. Kira, on the other hand, confirms that I’ve awakened, staring at me with her blank eyes, and then stares into space impassively, holding her favorite doll in her arms, as always. I brush my teeth, wash my face, then go to the kitchen to prepare breakfast. I think of my old house, back in the homeland. It was just a small box of a house but it had a nice warm bath. I really wish I could take a bath. Once breakfast is ready, I go to wake Kai up. As always, he opens his eyes lightly and then closes them again. He’s awake, he just needs a little more time and effort to get out of bed. Funny how a single blanket could turn a leopard into such a harmless sloth. After leaving a hot water bowl and Kai’s face towel next to his mattress, I head back to the kitchen. To my surprise, the old wooden dining table has already been set. Kira sits in her place, still holding her doll impassively. Her eyes are as blank as always, but I know she’s gradually changing. With such a simple action, she has blown away all of my worries and exhaustion. Even though my body is tired, my smile has finally come back. I pick up my violin, gently rub Kira’s head, and then start playing a few of my favourite pieces. Kai, having finally left his bed, ambles closer to listen to my music. His face is unwashed, as expected, and Kira is still not reacting much. But I don’t mind. I continue to play with a smile on my face. During the entire meal, Kai talks to Kira in excited tones. I guess he had some really good dreams last night. Kira doesn’t reply often, and when she does, her voice is so quiet that I doubt even Kai could hear it. But I could see her subtle smile every now and then. The whole atmosphere is really warm. It reminds me of Sunday dinners when I was a kid. We don’t have to go out today. After cleaning up, I just stand in the corner of the room, watching the kids play. I haven’t been in such a good mood for a long time, so I decide to seriously clean up and reorder the rooms. I haven’t really cleaned at all since we started living here a few days ago, and I want the kids to live in a clean environment anyway. I start with the books that Kira piled up in the corner after finishing them. I wish I could understand the language, just to know what she’s been reading. There are some books with silly covers, but most of them are too generic to guess. With all the books in my arms, I head to the library room. This one… goes here. Title starts with L… there, that last row. This last ro.. Ink!?You can read all chapters in better format here.
|
|
|
|
|