Code Monkey home page Code Monkey logo

apperception's People

Contributors

richardevans avatar richardprideauxevans avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

apperception's Issues

Questionable output on data file "predict_example.lp"

When running data file "predict_example.lp" in the "misc" folder, I get the following output:

Taras-Macbook:apperception-master macbook$ ~/.cabal/bin/solve misc predict_example.lp
Solving misc predict_example.lp
Generating temporary files...
Generated temp/misc_predict_example_init.lp
Generated temp/misc_predict_example_subs.lp
Generated temp/misc_predict_example_var_atoms.lp
Generated temp/misc_predict_example_interpretation.lp
Generated temp/misc_predict_example_script.sh
Calling clingo...
Processing data/misc/predict_example.lp.
-------------
Answer
-------------


Initial conditions
------------------

s(c_on,obj_sensor_a)
s(c_on,obj_sensor_b)
s(c_p3,obj_sensor_a)
s(c_p3,obj_sensor_b)

Permanents
----------

isa2(p_r,obj_sensor_a,obj_sensor_b)
isa2(p_r,obj_sensor_b,obj_sensor_b)

Rules
-----


Constraints
-----------

c_on+c_off
c_p1+c_p2+c_p3

Trace
-----

Time 1: 
s(c_on, obj_sensor_a)
s(c_on, obj_sensor_b)
s(c_p3, obj_sensor_a)
s(c_p3, obj_sensor_b)

Time 2: 
s(c_on, obj_sensor_a)
s(c_on, obj_sensor_b)
s(c_p3, obj_sensor_a)
s(c_p3, obj_sensor_b)

Time 3: 
s(c_on, obj_sensor_a)
s(c_on, obj_sensor_b)
s(c_p3, obj_sensor_a)
s(c_p3, obj_sensor_b)

Time 4: 
s(c_on, obj_sensor_a)
s(c_on, obj_sensor_b)
s(c_p3, obj_sensor_a)
s(c_p3, obj_sensor_b)

Time 5: 
s(c_on, obj_sensor_a)
s(c_on, obj_sensor_b)
s(c_p3, obj_sensor_a)
s(c_p3, obj_sensor_b)

Time 6: 
s(c_on, obj_sensor_a)
s(c_on, obj_sensor_b)
s(c_p3, obj_sensor_a)
s(c_p3, obj_sensor_b)

Time 7: 
s(c_on, obj_sensor_a)
s(c_on, obj_sensor_b)
s(c_p3, obj_sensor_a)
s(c_p3, obj_sensor_b)

Time 8: 
s(c_on, obj_sensor_a)
s(c_on, obj_sensor_b)
s(c_p3, obj_sensor_a)
s(c_p3, obj_sensor_b)

Time 9: 
s(c_on, obj_sensor_a)
s(c_on, obj_sensor_b)
s(c_p3, obj_sensor_a)
s(c_p3, obj_sensor_b)

Time 10: 
s(c_on, obj_sensor_a)
s(c_on, obj_sensor_b)
s(c_p3, obj_sensor_a)
s(c_p3, obj_sensor_b)


Statistics
----------

Num arrow rules: 0
Num causes rules: 0
Total body atoms: 0
Num inits: 6
Total cost: 6
Total num clauses: 6



Accuracy
--------

Status: incorrect

Percentage accurate: NaN

Optimization: 10

As can be seen above, the set of rules is empty, and thus every state in the trace is equal to the initial state. This is unexpected, as the pattern in the input sensory sequence is simple and predictable: the two sensors can each be described as looping through the states on-on-off repeat.

In conclusion, I would have expected a full-blown unified interpretation as the output. Might there be a mistake in the file, or in the system elsewhere? Or is it my expectations that are incorrect?

"cabal new-build" failure

Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):
 - csound-expression-dynamic-0.3.7 (lib) (requires build)
 - csound-expression-typed-0.2.5 (lib) (requires download & build)
 - csound-expression-opcodes-0.0.5.1 (lib) (requires build)
 - csound-expression-5.3.4 (lib) (requires build)
 - csound-sampler-0.0.10.0 (lib) (requires build)
 - csound-catalog-0.7.4 (lib) (requires build)
 - solve-0.2.0.0 (exe:solve) (first run)
Downloading  csound-expression-typed-0.2.5
Starting     csound-expression-dynamic-0.3.7 (lib)
Building     csound-expression-dynamic-0.3.7 (lib)

Failed to build csound-expression-dynamic-0.3.7.
Build log (
/home/mu/.cabal/logs/ghc-8.10.7/csound-expression-dynamic-0.3.7-9d694266376ec725bfb00f8d4b06e92a90c6b96322ec685ff3563cfb557e81a1.log
):
Warning: csound-expression-dynamic.cabal:3:23: Packages with 'cabal-version:
1.12' or later should specify a specific version of the Cabal spec of the form
'cabal-version: x.y'. Use 'cabal-version: 1.22'.
Configuring library for csound-expression-dynamic-0.3.7..
Preprocessing library for csound-expression-dynamic-0.3.7..
Building library for csound-expression-dynamic-0.3.7..
[ 1 of 15] Compiling Csound.Dynamic.Tfm.DeduceTypes ( src/Csound/Dynamic/Tfm/DeduceTypes.hs, dist/build/Csound/Dynamic/Tfm/DeduceTypes.o, dist/build/Csound/Dynamic/Tfm/DeduceTypes.dyn_o )
[ 2 of 15] Compiling Csound.Dynamic.Tfm.UnfoldMultiOuts ( src/Csound/Dynamic/Tfm/UnfoldMultiOuts.hs, dist/build/Csound/Dynamic/Tfm/UnfoldMultiOuts.o, dist/build/Csound/Dynamic/Tfm/UnfoldMultiOuts.dyn_o )
[ 3 of 15] Compiling Csound.Dynamic.Types.Exp ( src/Csound/Dynamic/Types/Exp.hs, dist/build/Csound/Dynamic/Types/Exp.o, dist/build/Csound/Dynamic/Types/Exp.dyn_o )

src/Csound/Dynamic/Types/Exp.hs:396:10: error:
    Duplicate instance declarations:
      instance Hashable1 IM.IntMap
        -- Defined at src/Csound/Dynamic/Types/Exp.hs:396:10
      instance Hashable1 IM.IntMap
        -- Defined in ‘hashable-1.3.4.1:Data.Hashable.Class’
    |
396 | instance Hashable1 IM.IntMap
    |          ^^^^^^^^^^^^^^^^^^^
cabal: Failed to build csound-expression-dynamic-0.3.7 (which is required by
exe:solve from solve-0.2.0.0). See the build log above for details.

Error when trying to generate latex-readable descriptions of the output

System details

  • Ubuntu 18.04
  • AWS t2.small instance

Code to replicate error

# updated system
$ sudo apt update
$ sudo apt upgrade

# cloned repo
$ git clone [email protected]:RichardEvans/apperception.git
$ cd apperception

# Installed Haskell
$ curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

# Installed Clingo
$ sudo add-apt-repository ppa:potassco/stable
$ sudo apt-get update
$ sudo apt-get install clingo

# Ran compilation as per:
# https://github.com/RichardEvans/apperception#compilation-instructions

# Set flag_output_latex = True in Interpretation.hs
# Ran script:
$ bash scripts/compile_solve.sh
$ . scripts/compile_solve.sh 
[ 1 of 11] Compiling HouseTypes       ( HouseTypes.hs, HouseTypes.o )

HouseTypes.hs:12:1: error:
    Could not find module ‘System.Random’
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
12 | import qualified System.Random as Random
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

# when running code inside compile_solve.sh
$ ghc -o solve -O2 Solve

<no location info>: error: module ‘Solve’ cannot be found locally


"cabal configure" failure

Installed Haskell, Clingo but "cabal configure" gives this:

# cabal configure
Warning: The configure command is a part of the legacy v1 style of cabal
usage.

Please switch to using either the new project style and the new-configure
command or the legacy v1-configure alias as new-style projects will become the
default in the next version of cabal-install. Please file a bug if you cannot
replicate a working v1- use case with the new-style commands.

For more information, see: https://wiki.haskell.org/Cabal/NewBuild

Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
[__0] trying: solve-0.2.0.0 (user goal)
[__1] next goal: base (dependency of solve)
[__1] rejecting: base-4.12.0.0/installed-4.1... (conflict: solve => base>=4.8
&& <4.9)
[__1] fail (backjumping, conflict set: base, solve)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: solve, base
Trying configure anyway.
Configuring solve-0.2.0.0...
cabal: Encountered missing dependencies:
base ==4.8.*,
containers ==0.5.*,
csound-catalog ==0.7.*,
csound-expression ==5.3.*,
csound-sampler ==0.0.*,
directory ==1.2.*,
random ==1.1.*,
split ==0.2.*,
universe-base ==1.0.*

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.