Jump to content
  • Advertisement
Sign in to follow this  
Nice Coder

Backend logic of a bot?

This topic is 4855 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been thinking for awhile now about a nice way to store facts about things, and the easiest way to get a bot to be able to infer data from known data. I was thinking of having a set of "objects". Each object has a number (for id), attributes, rules, and actions (scripts for that object). It also has a list of objects that inherits it. (yes, its strange, but its also pretty efficient). Inheritence works by filling in "defaults" for values for when we don't have specifics. ie. if i know that a wooden table is red, it sticks with that answer, rather then the derived answer of brown (as its made from wood, it inherits from it) If, however, you jave have a normal wooden table, it would answer that its brown, without needing to be told. For example, pick countries. We have a base object, "Country". It has the Size attribute of "Big". (so we know that a country is big, even if we don't know how big it is) We also have a "Location" attribute being "Earth". So, (translating queries into english, which my frontend bot will do) Which is bigger, belgium, or my big toe? Belgium (belgium inherits from country, so it inherited the size attribute of "Big", my big toe is an instance of big tow, which is an instance of toe, which has no size attribute, so its considered small). This was a question from last years (iirc) lobenner prize. You could also ask "Where is belgium", and it would answer "Earth" (which is right, just a little... vague.) A nice thing would be, for ex. to ask "Is a human warm blooded". It would come back yes, as a human is a mammal, and a mammal is warm blooded. Now, for a backend, does anybody see any problems? (i need to store facts, and draw inferences from them as quickly and efficiently as possible.) From, Nice coder

Share this post

Link to post
Share on other sites
I suppose the classical answer would be : look at prolog, that is the inference engine most AI researchers use (or used to use). But personally I find it lacks some convenient features.

Currently I am using CLIPS which has a good inference engine, whose behavior is maybe closer to what you need. It also provides a mean to implement class-like objects (but I never used these feature, I can't comment them). I like it partly because it provides python bindings which is my favorite language.

python bindings:

If you are using java or lisp, you may be interested in Algernon, which looked like an elegant inference engine to me.

Algernon for LISP:
Algernon for Java:

FLORA-2 is also a nice project, correcting some flaws of prolog, but it looked a bit too academic IMHO and lacked the usability of some other libs.

FLORA-2 Homepage

I would recommend you to first give CLIPS a try. It's cool to see someone interested in the same topic as I, do not hesitate to PM me about your project, I would be glad to share informations!

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!