Coder Social home page Coder Social logo

abstractlogic.jl's People

Contributors

econometricsbysimulation avatar

Stargazers

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

Watchers

 avatar  avatar

abstractlogic.jl's Issues

Include an index feature {i} for variable assertion

Allow there to be the option of comparing between items in same row but different column such as "{i} == {i+1}" perhaps would say in a Combination Matrix(a in 1:10, b in 1:10, c in 1:10) that either a need equal b or b need equal c. Or perhaps "{i} == 1 ==> {i+1} == 3" so if a is equal to 1 then b must be equal to 3 and if b is equal to 1 then c is equal to 3.

Allow Domain Inference

Not ideal but imaginable that someone might want not to have to declare domains for variables. In this case feasible outcomes would be inferred by context.

]] a>b
1 feasible outcome # (a>b) this is excluding alternative variables yet undefined c,d,etc
]] c>b
2 feasible outcomes # (a>c, c<a) this is excluding alternative operators for example (a==c)
]] b=1|2
1 feasible outcome # (a=2, b=1, c=2) since we would be force to assert that a, b can only 
take values 1 or 2. Things get a little wonky when we are not defining ranges but this 
kind of this is possible to infer.

Allow variable values to be strings

Obvious example would be, a, b, c, d in "Thistle wine", "Move Forward", "Move Back", "Poison"

Perhaps the code already supports this feature.

Include an assertion function

An assertion function would collect the feasible values for each variable in a AbtractLogic type. For example. Perhaps myAB.domain = (a = 1:4, b = 1:4, c=[1,2,4])

While values would use the boolean set to generate the collection of unique feasible values each variable can take. values(myAb.domain) = (a = [1,3], b = [2], c=[1,4])

Allow Variables to Have Multiple Attributes

Allow variables to have multiple attributes. say you have a combination matrix defined main(bottle1 = 1:4, bottle2 1:4, bottle3 1:4, bottle4 = 1:4) allow secondary attributes accessed through . assignment such as bottle1.height = 1:2, bottle2.height =1.2.

It is then possible to set up relations between attributes {i}.height == 2 ==> {i} != 4

Generate a function which evaluates the "power" of each clue

Basically permutate the order of each assertion to see how much of the feasible combinatoric set is reduced by that assertion. The overall purpose would be to see how many clues are required to narrow down the feasible set. Some clue set might be much more restrictive causing a solver to find the answer much more quickly. For example a = 1 is a very restrictive clue while a = 1|2 if b = 2|3 imposes very weak restrictions on the feasible domain. domain(a = 1:3, b = 1:3) After clue a = 1 range is reduced to (a=1, b=1:3) or three outcomes while after a = 1|2 if b = 2|3 the range is reduced to [(1,2),(1,3),(2,2),(2,3),(3,1),(3,2),(3,3) or seven outcomes.

Also an interesting feature would be to see how much the range of outcomes is reduced given each clue. For example a = 1 might be a more restive clue in terms of restricting the domain compared with a = b even though the later might restrict the total number of feasible outcomes more (or in this case equally). Range after a = 1 is (a=1,b=1:3) while after a=bthe range is now((1,1),(2,2),(3,3))`. I am not sure what this tells us. I suspect the second is harder to solve with.

Include an Abstract Logic REPL

It would be ideal if users could interface with the package through their own REPL with a few special commands that generate feasible sets and evaluate domains. This is something I will definitely need some help with (especially given pycall and therefore OHMYREPL does not seem to work on windows and I don't want the package to only work in windows).

Ideal Example

] a,b,c,d in 1:4
256 possible matches
] a =1|2
128 possible matches
] a=b+1
xx possible matches
] c==d <=> a != c
xx possible matches
] clear
Environment cleared - 0 possible matches
] a,b,c in 1:10
1000 possible matches
] d, e in 1:2
4000 possible matches

Generate relational operators for ranges

Use the relational operators presented in the clues to generate a set of possible relational ranges feasible from the data.

] a,b,c,d in 1:4
256 possible outcomes
] a>b
192 possible outcomes
] c<a
96 possible outcomes
] d = a|c
24+ possible outcomes
] :feasibleranges
[a = (a="=",b=">",c=">",d=[">","="]), b=(a="<",c=[">","=","<"]...]
# Not sure if I did that right but I think I get the idea.

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.