econometricsbysimulation / abstractlogic.jl Goto Github PK
View Code? Open in Web Editor NEWAn Abstract Reasoning Logic Interface
License: Other
An Abstract Reasoning Logic Interface
License: Other
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.
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.
Obvious example would be, a, b, c, d in "Thistle wine", "Move Forward", "Move Back", "Poison"
Perhaps the code already supports this feature.
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])
In AbstractLogic, there are 5 operators which are
But it is missing
Modulus is described in https://en.wikipedia.org/wiki/Modulo_operation
Please implement the modulus operator for AbstractLogic.jl
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
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.
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
Make Hotmatrix have two fields
struct Hotmatrix
values::dictionary (or named tuple) #(a= 1:5, b=1:5,c=1:10)
subset::Array{Bool,1}
end
Allow the push! of new keys into an object
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.