GOLOG
{{short description|High-level logic programming language}}
{{Infobox programming language
| paradigm = logic programming
| released = {{Start date and age|1994|df=yes}}
| implementations = golog.lua, IndiGolog
| influenced by = Prolog
| file_ext = .pl
}}
GOLOG is a high-level logic programming language for the specification and execution of complex actions in dynamical domains. It is based on the situation calculus. It is a first-order logical language for reasoning about action and change. GOLOG was developed at the University of Toronto.{{Cite journal|last1=Levesque|first1=Hector J.|last2=Reiter|first2=Raymond|last3=Lespérance|first3=Yves|last4=Lin|first4=Fangzhen|last5=Scherl|first5=Richard B.|date=1997-04-01|title=GOLOG: A logic programming language for dynamic domains|journal=The Journal of Logic Programming|series=Reasoning about Action and Change|volume=31|issue=1|pages=59–83|doi=10.1016/S0743-1066(96)00121-5|issn=0743-1066|doi-access=free}}{{Cite journal|title=GOLOG: A logic programming language for dynamic domains|url=http://www.cs.toronto.edu/cogrobo/Papers/GOLOGlang.pdf|journal=GOLOG: A Logic Programming Language for Dynamic Domains}}
History
The concept of situation calculus on which the GOLOG programming language is based was first proposed by John McCarthy in 1963.{{cite book|url=http://cialdea.inf.uniroma3.it/teaching/logica/materiale/dispense-golog.pdf|language=it|author=Marta Cialdea Mayer|title=Il Calcolo delle Situazioni e il linguaggio Golog|date=2010}}
Language
A GOLOG interpreter automatically maintains a direct characterization of the dynamic world being modeled, on the basis of user supplied axioms about preconditions, effects of actions and the initial state of the world. This allows the application to reason about the condition of the world and consider the impacts of different potential actions before focusing on a specific action.{{Cite web|url=https://swmath.org/software/2159|title=GOLOG - Mathematical software - swMATH|website=swmath.org|access-date=2020-01-12}}
Golog is a logic programming language and is very different from conventional programming languages. A procedural programming language like C defines the execution of statements in advance. The programmer creates a subroutine which consists of statements, and the computer executes each statement in a linear order. In contrast, fifth-generation programming languages like Golog are working with an abstract model with which the interpreter can generate the sequence of actions. The source code defines the problem and it is up to the solver to find the next action. This approach can facilitate the management of complex problems from the domain of robotics.
A Golog program defines the state space in which the agent is allowed to operate. A path in the symbolic domain is found with state space search. To speed up the process, Golog programs are realized as hierarchical task networks.{{cite conference |title=Programming hierarchical task networks in the situation calculus |author=Gabaldon, Alfredo |conference=AIPS'02 Workshop on On-line Planning and Scheduling |year=2002}}
Apart from the original Golog language, there are some extensions available. The ConGolog language provides concurrency and interrupts. Other dialects like IndiGolog and Readylog were created for real time applications in which sensor readings are updated on the fly.{{cite thesis |type=PhD |title=Planning and verification in the agent language Golog |author=Classen, Jens |year=2013 |publisher=Hochschulbibliothek der Rheinisch-Westfalischen Technischen Hochschule Aachen }}
Uses
Golog has been used to model the behavior of autonomous agents. In addition to a logic-based action formalism for describing the environment and the effects of basic actions, they enable the construction of complex actions using typical programming language constructs.
It is also used for applications in high level control of robots and industrial processes, virtual agents, discrete event simulation etc.{{Cite journal|last=G'omez|first=Sergio Alejandro |title=The Golog Programming Language and Agency|url=http://sedici.unlp.edu.ar/bitstream/handle/10915/21467/Documento_completo.pdf?sequence=1&isAllowed=y|journal=The Golog Programming Language and Agency}} It can be also used to develop BDI (Belief Desire Intention)-style agent systems.{{Cite book|last1=Sardina|first1=Sebastian|last2=Lespérance|first2=Yves|title=Programming Multi-Agent Systems|chapter=Golog Speaks the BDI Language|series=Lecture Notes in Computer Science|date=2009-05-10|chapter-url=http://www.cse.yorku.ca/~lesperan/papers/PROMAS09.pdf|journal=Golog Speaks the BDI Language DO|volume=5919|pages=82–99|doi=10.1007/978-3-642-14843-9_6|isbn=978-3-642-14842-2}}
Planning and scripting
In contrast to the Planning Domain Definition Language, Golog supports planning and scripting as well.{{cite conference |title=Continual planning in Golog |author=Hofmann, Till and Niemueller, Tim and Cla\ssen, Jens and Lakemeyer, Gerhard |conference=Thirtieth AAAI conference on artificial intelligence |year=2016 }}{{cite conference |title=Acting and deliberating using golog in robotic soccer--a hybrid architecture |author=Dylla, Frank and Ferrein, Alexander and Lakemeyer, Gerhard |conference=Proc. CogRob02, AAAI Press |year=2002 }} Planning means that a goal state in the world model is defined, and the solver brings a logical system into this state. Behavior scripting implements reactive procedures, which are running as a computer program.{{cite journal |title=Using Golog for Deliberation and Team Coordination in Robotic Soccer |author=Ferrein, Alexander and Fritz, Christian and Lakemeyer, Gerhard |journal=KI |volume=19 |number=1 |pages=24 |year=2005 }}
For example, suppose the idea is to authoring a story. The user defines what should be true at the end of the plot. A solver gets started and applies possible actions to the current situation until the goal state is reached. The specification of a goal state and the possible actions are realized in the logical world model.{{cite thesis |type=PhD |title=Flexible authoring using GOLOG planning in interactive storytelling |author=Gudhmundsson, Tryggvi Thor |year=2017 |publisher=Reykjavík University Iceland}}
In contrast, a hardwired reactive behavior doesn't need a solver but the action sequence is provided in a scripting language.{{cite conference |doi=10.1007/10719619_13 |year=2000 |publisher=Springer Berlin Heidelberg |pages=173–187 |author=Yves Lesperance and Kenneth Tam and Michael Jenkin |title=Reactivity in a Logic-Based Robot Programming Framework |conference=Intelligent Agents VI. Agent Theories, Architectures, and Languages }} The Golog interpreter, which is written in Prolog,{{cite conference |title=golog. lua: Towards a non-prolog implementation of GOLOG for embedded systems |author=Ferrein, Alexander |conference=2010 AAAI Spring Symposium Series |year=2010 }} executes the script and this will bring the story into the goal state.