Buy it, use it, break it, fix it, plug it, play it, burn it, rip it, drag and drop it, zip – unzip it

    July 12, 2019

    What one can learn from Game AI development

    Below is an excerpt from STRIPS: A New Approach to the Application of Theorem Proving to Problem Solving, R. E. Fikes and N. J. Nilsson, Artificial Intelligence 2 (3–4), 1971. (pdf):

    STRIPS belongs to the class of problem solvers that search a space of “world models” to find one in which a given goal is achieved. For any world model, we assume there exists a set of applicable operators each of which transforms the world model to some other world model. The task of the problem solver is to find some composition of operators that transforms a given initial world model into one that satisfies some particular goal condition.

    The basic idea is that a world model is modified by operators, which have a set of preconditions and side effects. STRIPS planner is used to find out how to apply these operators to achieve the goal given some state. (But don’t confuse this approach with a Prolog programming language that operates with formal logic on top of a knowledge base without any side effects.) The original algorithm without any optimizations is simple: find which operator achieves the goal, then if the operator’s prerequisites are not satisfied your new goal is to satisfy those, in the end, choose the easiest plan. STRIPS was featured in F.E.A.R. and several other games, that were (and to some degree still are) cutting-edge in-game AI development.

    AI in game development

    The main thing one can learn from this is clear segregation between WHAT and HOW. WHAT is your goal defined in terms of conditions applied to the state (defines a subset of all possible states). HOW is a set of operators do the job. Everything else does a planner that doesn’t depend on the domain and can be easily reused from project to project.

    An example
    Imagine you are about to implement a private cloud solution. You can implement a set of operators like bring the interface up, make a bridge, obtain an address via DHCP, mount volume, create the container with lxc, etc. Each of these operators has prerequisites like obtaining an address via DHCP an interface must be up and running. Define states in terms of MIBs and use SNMPv3 to get/set state. Then you can easily define goals like provision a VM and the planner will do it for you using defined operators. The good news is that if something happens in the middle of VM provisioning (state changed from A to A’) planner can deal with this by providing a new plan. If you need to integrate someone’s solution just add a few new operators and the planner will benefit from them immediately. Compare and contrast this approach to OpenStack solution that is obsessed with (micro-)SOA ideas, not in the best way.
    Can this be applied to web development? Consider you have a bunch of operators with arguments, prerequisites and side effects defined. In case one does not handle these operators as black boxes and with a bit of introspection understands prerequisites and side effects planner can build workflows by connecting operators together and it can also build an interface to input arguments for operators in the plan and react to unexpected (what if Paypal payment failed, a planner can suggest you pay in another way). The only thing left is to present the current state in a nice way to the user.

    Final thoughts

    One day devs used macro assembler, then C, nowadays OOP and FP hit the fan, but we need to go further and program in terms of business rules and goals. Even AngularJS and Backbone are too low level.

    • #AI
    • #Gaming
    • #Machine learning
    • #Strips
    • #Theorem Prover

    Share Article

    Success stories

    LLM-based financial investment advisory chatbot
    #Large Language Model
    #Text analysis

    LLM-powered investment advisory chatbot for efficient investment decision making

    Digital financial market infrastructure platform
    #Distributed ledger technology
    #Transaction monitoring

    Building a scalable, secured system allows users to instantly create transactions in any asset, from anywhere on Earth, at any time.

    Transaction monitoring and suspicious data detection solution
    #Data analytics
    #Sensitive data
    #Transaction monitoring

    Transaction monitoring system development with complying data security standards


    Certification thumbnail