Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: I combined a A.I. Chatbot with a 2D exploration game!  (Read 786 times)

0 Members and 1 Guest are viewing this topic.

mrzo

  • Newbie
  • *
  • Posts: 4
    • View Profile
I combined a A.I. Chatbot with a 2D exploration game!
« on: December 19, 2021, 09:36:52 pm »
Hey SFML fellows,

So I love space exploration games (first thing I tried with SFML was an asteroid shooter)! But space is big - so sometimes it is a little bit boring to fly through or to do the daily trading grind all by yourself. That's how I came up with the idea of an A.I. assistant who gives you some company. Her name is Hopper. She is not the smartest conversational android out there but at least she knows how to steer a space ship.

The game is called Black Sun and it will take some time before I can put it in a polished-enough state to release it in Early Access but I am already very excited to share this trailer with you:

http://www.youtube.com/watch?v=oBjvcstFTqQ

The libraries I use are:

You can follow the development of the game on steam (https://store.steampowered.com/app/1670930/Black_Sun/) or on twitter, youtube or soundcloud (https://linktr.ee/blacksungame).

Take care and if you have any questions, feel free to ask :)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10044
    • View Profile
    • development blog
    • Email
Re: I combined a A.I. Chatbot with a 2D exploration game!
« Reply #1 on: December 20, 2021, 09:12:24 am »
That's a really cool idea! :)
I always wondered how an adventure game would look like with an AI

Is the response time from the "AI" really as fast as in the trailer?
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

mrzo

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: I combined a A.I. Chatbot with a 2D exploration game!
« Reply #2 on: December 20, 2021, 12:14:18 pm »
It is actually almost instant so I had to add a small delay to make it more "human-like" :)

It's quite fast because a neural network translates the input string into a fixed size vector which is compared with an existing database of vectors of other pre-translated semantic patterns. This allows me to cover many different wordings of the same commands (e.g. the vectors for "Repair the ship" and "Fix the damage please" are quite similar). When finding a similar pattern, I can simply return its recorded response or call its attached action.

The database currently contains around 10k pairs of patterns and responses / actions. But even with 1M of patterns there shouldn't be any problem with the performance since it is a simple cosine similarity calculation :)

 

anything