Giter Club home page Giter Club logo

nugat-ma's Introduction

MULTI-AGENT NuGaT Game Solver (for NuSMV 2.6.0+)#

This is the Multi-Player/Agent NuGAT Game Solver 0.6.5+, built as an extension of the original NuGAT Game Solver built on top of NuSMV model checker.

This version is compatible with NuSMV 2.6.0 and is able to handle many players/agents with ATL-like reachability/ability specifications: <<A>>p means can group of agents A jointly achieve/reach p.

Develped as part of Lorenzo Dibenedetto Master's thesis, supervised by A/Prof. Sebastian Sardina and Dr. Nitin Yadav at RMIT University (in 2015-2016).

OVERVIEW

NuGAT Game Solver was developed at the FBK-ES group. The last version was 0.5.0 which worked with NuSMV 2.5.0 (but not with newer versions).

NuSMV had an important upgrade to 2.5.4.

Then, in June 2015, NuGAT 0.5.0 was ported to 0.5.4 to work with NuSMV 2.5.4 by Nitin Yadav and Sebastian Sardina: NuGaT 0.5.4 repo

After that, NuSMV had a major upgrade to version 2.6.0 that changed the whole architecture: NuSMV 2.6.0 release news

Then, NuGAT was upgraded, in October 2015, to version 0.6.0 to work with this new NuSMV 2.6.0 as part of Lorenzo Dibenedetto Master's thesis, supervised by Sebastian Sardina and Nitin Yadav: NuGaT 0.6.0 repo

Finally, NuGAT was extended in December 2015 to incoporate multi-agent ATL-like verificatoin.

INSTALLATION INSTRUCTIONS

  1. Make sure you have compiled and installed NuSMV 2.6.0 and then set the following environmet variables:

     export NUSMV_BUILD_DIR=/opt/NuSMV-2.6.0/
     export NUSMV_SOURCE_DIR=~/src/NuSMV/NuSMV-2.6.0/NuSMV/
    

    Remember you can install NuSMV in your own directory:

     cmake .. -DCMAKE_INSTALL_PREFIX=~/opt/nusmv-2.6.0/
     make
     make install
    

    See extras/NuSMV-2.6.0/ for NuSMV package and install instructions for this version..

  2. Some of the packages needed:

     sudo apt-get install libc6-dev g++ pkg-config automake pkgconf icu-config
     sudo apt-get install flex bison 
     sudo apt-get install libreadline5 libreadline6
     sudo apt-get install libexpat1 libexpat1-dev libxml2-dev liblzma-dev libicu-dev
     sudo apt-get install ruby-libxml 
     sudo apt-get install libncurses5:amd64 libncurses5:i386 libncurses5-dev:amd64 libncurses5-dev:i386
    

Note:

  • pkgconf is a program which helps to configure compiler and linker flags for development frameworks. It is similar to pkg-config from freedesktop.org. libpkgconf is a library which provides access to most of pkgconf's functionality, to allow other tooling such as compilers and IDEs to discover and use frameworks configured by pkgconf.

  • icu-config simplifies the task of building and linking against ICU as compared to manually configuring user makefiles or equivalent. Because icu-config is an executable script, it also solves the problem of locating the ICU libraries and headers, by allowing the system PATH to locate it.

  1. BUILD WITH CMAKE (newer):

     mkdir build
     cd build
     rm -rf *
     cmake ..        # this generate the Makefiles
     cmake --build . # this generate NuGAT executable
    

    This should finish a ./NuGaT executable:

     [ssardina@Thinkpad-X1 build]$ ./NuGaT 
     *** This is NuGaT 0.6.0 (compiled on Sat Dec 12 00:19:13 UTC 2015)
     *** Enabled addons are: game 
     *** For more information on NuGaT see <http://es.fbk.eu/tools/nugat>
     *** or email to <[email protected]>.
     *** Please report bugs to <[email protected]>.
     *** Copyright (c) 2010, Fondazione Bruno Kessler
    
     *** This version of NuGAT-0.6.5 is linked to NuSMV 2.6.0.
     *** For more information on NuSMV see <http://nusmv.fbk.eu>
     *** or email to <[email protected]>.
     *** Copyright (C) 2010-2014, Fondazione Bruno Kessler
    
     *** This version of NuGAT-0.6.5 is linked to the CUDD library version 2.4.1
     *** Copyright (c) 1995-2004, Regents of the University of Colorado
    
     *** This version of NuGAT-0.6.5 is linked to the MiniSat SAT solver. 
     *** See http://minisat.se/MiniSat.html
     *** Copyright (c) 2003-2006, Niklas Een, Niklas Sorensson
     *** Copyright (c) 2007-2010, Niklas Sorensson
    
  2. Install binary NuGAT wherever you would like to be in your system.

USAGE

It is assumed that the reader is familiar with concepts of two player games.

Games are implemented as a special mode of NuGaT which is entered when a source file containing a game is given either as input file when calling NuGaT or when using the "read_model" or the "read_rat_file" commands in the NuGaT shell. The mode is left when the "reset" command is used in the NuGaT shell. While in game mode the NuGaT shell command help provides an overview of the available commands. Calling a NuGaT shell command with argument "-h" prints a brief usage message.

NuGaT 0.6.5+ uses extended features to accommodate multi-agents; each agent is a number. Basically, what it used to be PLAYER_N now it is just N.

The usual keywoerds are still available for players 1 and 2, but there is also now the ATL "ATLREACHTARGET (n1,n2,n3) spec" stating that team (n1,n2,n3) can force/reach the spec.

Try some examples in examples/

TWO PLAYER AGENT ONES (as in original NuGaT):

The port of the original NuGaT example (gets same results):

./NuGaT ../examples/NuGAT/simple.smv

An example to solve a planning program:

./NuGaT -dynamic ../examples/NuGAT/test-nugat.smv

MULTI-AGENT ONES:

./NuGaT ../examples/atl/simple-atl-01.smv     # just one query
./NuGaT ../examples/atl/simple-atl-02.smv     # multiple queries


[ssardina@Thinkpad-X1 build]$ ./NuGaT ../examples/atl/simple-atl-02.smv 
*** This is NuGaT 0.6.5 (compiled on Sun Nov 26 10:59:39 2017)
*** Enabled addons are: game 
*** For more information on NuGaT see <http://es.fbk.eu/tools/nugat>
*** or email to <[email protected]>.
*** Please report bugs to <Please report bugs to <[email protected]>>.
*** Copyright (c) 2010, Fondazione Bruno Kessler

*** This version of NuGAT-0.6.5 is linked to NuSMV 2.6.0.
*** For more information on NuSMV see <http://nusmv.fbk.eu>
*** or email to <[email protected]>.
*** Copyright (C) 2010-2014, Fondazione Bruno Kessler

*** This version of NuGAT-0.6.5 is linked to the CUDD library version 2.4.1
*** Copyright (c) 1995-2004, Regents of the University of Colorado

*** This version of NuGAT-0.6.5 is linked to the MiniSat SAT solver. 
*** See http://minisat.se/MiniSat.html
*** Copyright (c) 2003-2006, Niklas Een, Niklas Sorensson
*** Copyright (c) 2007-2010, Niklas Sorensson

*** WARNING: Game addon does not support properties COI size sorting.  ***
*** WARNING: Properties COI size sorting will be disabled.             ***
--   AtlReachTarget 1  x2  : no strategy exists

--   AtlReachTarget 3  x2  : no strategy exists

--   AtlReachTarget 4  x2  : no strategy exists

--   AtlReachTarget 1 3  x2  : no strategy exists

--   AtlReachTarget 1 4  x2  : no strategy exists

--   AtlReachTarget 3 4  x2  : no strategy exists

--   AtlReachTarget 1 3 4  x2  : the strategy has been found

There are more examples in examples/ subdir

or interactively:

[ssardina@Thinkpad-X1 build]$ ./NuGaT -int
*** This is NuGaT 0.6.5 (compiled on Sun Nov 26 10:59:39 2017)
*** Enabled addons are: game 
*** For more information on NuGaT see <http://es.fbk.eu/tools/nugat>
*** or email to <[email protected]>.
*** Please report bugs to <Please report bugs to <[email protected]>>.
*** Copyright (c) 2010, Fondazione Bruno Kessler

*** This version of NuGAT-0.6.5 is linked to NuSMV 2.6.0.
*** For more information on NuSMV see <http://nusmv.fbk.eu>
*** or email to <[email protected]>.
*** Copyright (C) 2010-2014, Fondazione Bruno Kessler

*** This version of NuGAT-0.6.5 is linked to the CUDD library version 2.4.1
*** Copyright (c) 1995-2004, Regents of the University of Colorado

*** This version of NuGAT-0.6.5 is linked to the MiniSat SAT solver. 
*** See http://minisat.se/MiniSat.html
*** Copyright (c) 2003-2006, Niklas Een, Niklas Sorensson
*** Copyright (c) 2007-2010, Niklas Sorensson

NuSMV > read_model -i ../examples/atl/simple-atl-02.smv 
Entering game mode...
Done entering game mode.
Note that now game commands apply.
NuSMV > go
*** WARNING: Game addon does not support properties COI size sorting.  ***
*** WARNING: Properties COI size sorting will be disabled.             ***
NuSMV > build_boolean_model 
NuSMV > check_property 
--   AtlReachTarget 1  x2  : no strategy exists

--   AtlReachTarget 3  x2  : no strategy exists

--   AtlReachTarget 4  x2  : no strategy exists

--   AtlReachTarget 1 3  x2  : no strategy exists

--   AtlReachTarget 1 4  x2  : no strategy exists

--   AtlReachTarget 3 4  x2  : no strategy exists

--   AtlReachTarget 1 3 4  x2  : the strategy has been found

NuGaT > quit
Exiting game mode...
Done exiting game mode.
Note that now the commands from before entering game mode apply.
%

COPYRIGHT

NuGAT version is licensed under the GNU Lesser General Public License (LGPL in short) as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. File LGPL-2.1 contains a copy of the License. For license information on Lily see its documentation.

CONTACT

This extension of NuGAT to multi-agent was carried out by:

For the original authors of NuGAT refer to the AUTHORS file in the distribution.

nugat-ma's People

Contributors

leonking4 avatar ssardina avatar

Watchers

James Cloos avatar Nitin Yadav avatar  avatar

nugat-ma's Issues

Mismatch between NuGAT 0.5.4 to 0.6.5?

test-nugat_ns.smv.txt
Uploading test-nugat.smv.txtโ€ฆ

Original report by Sebastian Sardina (Bitbucket: [Sebastian Sardina](https://bitbucket.org/Sebastian Sardina), ).


@lorenzo_dibenedetto found this:

These are the files with this anomaly from NuGAT 0.5.4 to 0.6.5.
----------------------- Previous Email
Hi Sebastian,

I hope you are doing well. ๐Ÿ˜‰

I finished to migrate all changes from nugat-0.6.0 to nugat-0.6.5 for -dynamic and -e options.

Instead, for the next() operator problem, I discovered that we have the same (wrong?) results with all NuGaT versions (from 0.5.4 to 0.6.5).

Attached .smv files with and without strategies. ( with next( _ = _ ) and next ( _ ) = _ operators ).

Regards

LD

Regards,
Lorenzo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.