ASPL Manual v 1.00
© 2024 by SetSphere.COM
[TOSSING DICE SIMULATION]
WORKSPACE DICERS DESCRIPTION:
Retrying the outcome of a die increases the certainty of the outcome, hence the enthropy also decreases as the certainty increases. The following ASPL variables have been assigned the result of three players throwing a pair of dice on a craptable. p123 is assigned the set results of ggdiceS() for the three players throwing the pair of dice 900 times. t123 the same as p123 except that die1 is retried 5 times to realize a face with 5 dots, and die2 is retried 5 times to realize a face with 3 dots. u123 the same as p123 except that die1 is retried 7 times to realize a face with 5 dots, and die2 is retried 7 times to realize a face with 3 dots.
① aspl> p123 = ggdiceS(players, player1 player2 player3,throws,900)
② aspl> t123 = ggdiceS(players, player1 player2 player3,throws,900,die1trials,5 5,die2trials, 3 5)
③ aspl> u123 = ggdiceS(players, player1 player2 player3,throws,900,die1trials,5 7,die2trials,3 7)
As the dice are being retried to achieve a certain outcome, the enthropy decreases as the certainty increases.
p123 has elements with enthropy 5.170
t123 has elements with enthropy 3.810
u123 has elements with enthropy 3.004
The checksum of each element is a number that encode the outcome shown on the faces of both dice, regardless of the order. The similarity of p123 such that the elements have the same faces for all three players at a specific throw can be obtained with with sim
`
fflc
④ aspl> sim`fflc p123
subset1 vs subset2 similarity 1 player2(1.p123) | player3(1.p123) 0.05778 2 player1(1.p123) | player3(1.p123) 0.05889 3 player1(1.p123) | player2(1.p123) 0.05778 player2(1.p123) | player3(1.p123) | ####################################### 0.05778 player1(1.p123) | player3(1.p123) | ######################################## 0.05889 player1(1.p123) | player2(1.p123) | ####################################### 0.05778 DONE PROCESSING sim`fflc p123
⑤ aspl> sim`fflc t123
subset1 vs subset2 similarity 1 player2(1.t123) | player3(1.t123) 0.16333 2 player1(1.t123) | player3(1.t123) 0.16556 3 player1(1.t123) | player2(1.t123) 0.16778 player2(1.t123) | player3(1.t123) | ###################################### 0.16333 player1(1.t123) | player3(1.t123) | ####################################### 0.16556 player1(1.t123) | player2(1.t123) | ######################################## 0.16778 DONE PROCESSING sim`fflc t123
⑥ aspl> sim`fflc u123
subset1 vs subset2 similarity 1 player1(1.u123) | player3(1.u123) 0.29889 2 player2(1.u123) | player3(1.u123) 0.30444 3 player2(1.u123) | player1(1.u123) 0.29889 player1(1.u123) | player3(1.u123) | ####################################### 0.29889 player2(1.u123) | player3(1.u123) | ######################################## 0.30444 player2(1.u123) | player1(1.u123) | ####################################### 0.29889 DONE PROCESSING sim`fflc u123
As the dice are being retried, the three players in the variables p123 t123 and u123 show that they have a higher throws matching outcome. Now we will use the ks command and make sure that the following attributes are set ks faces face1 face2 dicesum chksum enthropy ppdd ffl aelm notice that the mtime attribute is excluded as the element made time is immaterial
Also notice how the three players have a higher throws matching outcome as the dice are being retried: Let's find the specific throws when all three players have the same outcome: this is to find the Union of all elements in the set variable such that the attributes of the elements are matching fU
`
ks=
To see how ASPL will interpret the command fU
`
ks=
⑦ aspl> sb fU`ks= p123
QUOTIENT SET BUILDER {fU`ks= p123} <=> fU`ks= p123 Detailed view: {fU`ks= p123} <=> fU ` ks= p123 | | | +-----> set-variable | | +-----------> have the same ksum | +--------------> such that +----------------> get the elements union Set builder syntax is read from left to right, or from bottom to top. All ASPL setops are setadic: they take a setop followed by set variables. Note that when typing the command: the setop, the stroke, and the quotient relation predicates must not include any space.
⑧ aspl> fU`ks= p123
(shows 2 elements matching)
⑨ aspl> fU`ks= t123
(shows 43 elements matching)
⑩ aspl> fU`ks= u123
(shows 133 elements matching)
5.170 3.810 3.004
The ks can set specific attributes of the element, and the sim
`
fflz will get the similarity of the set variable while matching these attributes.
To see the attributes, you can type either attributes or ks
⑪ aspl> attributes
⑫ aspl> ks
⑬ aspl> help ks
⑭ aspl> ks dicesum aelm
(set the ks vector to attributes: dicesum aelm)
⑮ aspl> sim`fflz p123
(get the similarity of p123 such that the ks vector is matching)
PARTITION
⑯ aspl> split p123 into p1 p2 p3
(split p123 into its constituent groups and save them into variables p1 p2 p3)
⑰ aspl> split t123 into t1 t2 t3
(do the same for t123)
⑱ aspl> split u123 into u1 u2 u3
(do the same for u123)
⑲ aspl> v
(view your variables )
VARIABLES TYPE 1 vname |card |user |xpC |Lop |Lvr |Lgn |Src ------------|----------|-----------|------------|-------|------------------|--------------------------------|------------------------------------ p123 |#2700/3 |(1)root |ggfunc |g_ |p123 |player1 player2 player3 |ggdiceS(players, player1 player2 p.. t123 |#2700/3 |(1)root |ggfunc |g_ |t123 |player1 player2 player3 |ggdiceS(players, player1 player2 p.. u123 |#2700/3 |(1)root |ggfunc |g_ |u123 |player1 player2 player3 |ggdiceS(players, player1 player2 p.. p1 |#900/1 |(1)root |split |g_ |p1 |player1 |split p123 p2 |#900/1 |(1)root |split |g_ |p2 |player2 |split p123 p3 |#900/1 |(1)root |split |g_ |p3 |player3 |split p123 t1 |#900/1 |(1)root |split |g_ |t1 |player1 |split t123 t2 |#900/1 |(1)root |split |g_ |t2 |player2 |split t123 t3 |#900/1 |(1)root |split |g_ |t3 |player3 |split t123 u1 |#900/1 |(1)root |split |g_ |u1 |player1 |split u123 u2 |#900/1 |(1)root |split |g_ |u2 |player2 |split u123 u3 |#900/1 |(1)root |split |g_ |u3 |player3 |split u123
the column Lgn shows the group label or labels. In ASPL the group label name is called the landing group name (Lgn), for instance p123 has tree group names: player1 player2 player3
when two variables have a common landing group name, you need to labinate the group labels so that ASPL can distinguish them. Labination is done using the , (comma) by prefixing or suffixing it to the setop:
⑳ aspl> ,fU t1 u1
⑴ aspl> ,fU`c= t1 u1
⑵ aspl> fU`c= t1 u1
to see the partitions of p1 p2 p3 according the the players when they get the same outcome (same checksum):
aspl> fP`c= p1 p2 p3
aspl> fP`c= p123
looking at the intersection of p1 and p123, labinate the operator by preceding it with a comma
aspl> ,f& p1 p123
aspl> ,f&`c= p1 p123
aspl> subset t1 t123
aspl> superset t123 t1
aspl> density t1 t123
aspl> ,fP`c= p1 t1 u1
to print these same outcome:
aspl> ,fU`c= p1 t1 u1
(get the union of the elements with same checksum, labinate the operator)
`
fflc
aspl> sim`fflc p1 t1 u1
aspl> ks faces face1 face2 dicesum chksum ppdd ffl aelm
aspl> sim`fflz p1 t1 u1
aspl> sim`fflc p1 t1 u1
aspl> ,fU`c= p1 t1
aspl> ,fU`c= p1 u1
aspl> ,fU`c= t1 u1
aspl> ,fU`c= p1 t1 u1
aspl> sim`c p1 t1 u1
aspl> xsim`c p1 t1 u1
aspl> ,cU p1 t1 u1
aspl> ,cU`ks= p1 t1 u1
aspl> r123 = ggdiceS(players, player1 player2 player3,throws,100)
aspl> sim`c r123
aspl> cU r123
aspl> cU`ks= r123
aspl> cP r123
aspl> cP`ks~ r123
aspl> cP`ks= r123
aspl> fP r123
aspl> ks face1 ppdd ffl aelm
aspl> fU`ks= p123
aspl> ks face2 ppdd ffl aelm
aspl> fU`ks= p123
aspl> sim`fflz p123
aspl> sim`fflz p123 t123
aspl> density p123
This example is shown in the following terminal.
terminal for example: TOSSING DICE SIMULATION