A theory of contemplation

In this paper you can explore the application of some notable Boolean-derived methods, namely the Disjunctive Normal Form representation of logic table expansions, and extend them to a real-valued logic model which is able to utilize quantities on the range [0,1], [-1,1], [a,b], (x,y), (x,y,z), and etc. so as to produce a logical programming of arbitrary range, precision, and dimensionality, thereby enabling contemplation at a logical level in notions of arbitrary data, colors, and spatial constructs, with an example of the production of a game character's logic in mathematical form.


Introduction
Let us begin please by considering the set S of all functions of the form f : X → Y and g : X, Y → Z where each X, Y , and Z are single bits from the set {0,1}. Then we have the set of functions as depicted in Tables 1 and 2 which we may call the George Boole Logical Operators, where all such operators of the form ⊖x, or x ⊛ y may be interpreted as functions, e.g. ⊖(x), or ⊛(x, y), and vice-versa. When given the variable X, or the tuple (X,Y ), which we may call Boolean variables, we may list each of their possible values, and then in the columns define each possible function that may exist.  Table 2: All Boolean Logical Operators : z = g n (x, y) X,Y g 1 g 2 g 3 g 4 g 5 g 6 g 7 g 8 g 9 g 10 g 11 g 12 g 13 g 14 g 15 g 16 From these tables we select the functions f 3 , g 2 , g 8 , and g 10 which satisfy the definitions of the Boolean NOT, AND, OR, and XNOR operators from [6], and so they are depicted in Table 3.  From these tables we can also observe that each function in S f can be written in terms of a function in S g as shown by Table 4, allowing that only those functions in S g be further utilized by this paper 1 .
Then the set S g may be used instead of the set S f and we select Theorem 1.1 to utilize XN OR(x, 0) instead of N OT (x), to thereby use AND, OR, and XNOR further in the paper. We show that XNOR is binary equivalent to NOT in the proof of Theorem 1.1. Then we can show that the extra parameter on XNOR embodies a previously constant value in the definition of logic table from [3]. We accomplish that through an analysis of world values, logic values, logic questions, logic tables and their expansion to a Disjunctive Normal Form (DNF) equation which computes the result designed by the logic table using the methods from [5] and [7].
During that analysis a series of examples are shown using conventional methods on discrete Boolean logical quantities (e.g. logic values from the set { 0, 1 }), and an extension to a non-discrete continuous logic space on the range [0, 1] is proposed, its methods utilizing logic tables are shown, and several examples and code samples are provided.
It is then shown that by extension, a pair of [0, 1] contemplations can achieve a full [-1, 1] contemplation and hence, achieve contemplation on the arbitrary range [a, b] and by further extension, through applying a further [0, 1] set of half-space vectors, yield contemplations at a logical level in terms of multidimensional arbitrary data quantities of (x, y), (x, y, z), (r, g, b), and etc. 1. An "atomic question" is a logic question that is so trivially answered that its input may be readily transformed directly into the question's answer, i.e. through fuzzification.

2.
A "moderate question" is a logic question that is deemed to be answered through the utilization of a single logic table.
3. A "hard question" is a logic question that takes upon itself the composition of a hierarchy of two or more logic tables, and is the subject of a further section of the paper.
Definition 2.6 A "contemplation" in this paper is a Fuzzy Control System process after [4], as follows: 1. A fuzzification of a set of world values W into a set of logic values Z (e.g. a perception).

2.
A contemplation on a set of logic values Z, e.g. an answering of a series of logic questions, in this paper using Boolean-derived methods in continuous mathematical form.
3. A defuzzification of some resulting logic value from Z into a world value W (e.g. a motive action).
In Problem 10.1 further in the paper we apply the fuzzy control system process by gathering a collection of world values which we are interested in, and organize them into a set W which we may further utilize.
We observe that world values are of any arbitrary units and form, and so we mathematically normalize them by utilizing a set of fuzzification functions to transform the world values into logic values which we may further contemplate upon.
We define logic values in Definition 2.2 to describe the various types of numeric values and their interpretations as utilized in this paper.
We answer logic questions with the methods in the paper, and produce logic values. When the logic value is strictly numeric we may further utilize its value mathematically. We may transform the logic value into a world value, or otherwise act upon it, through an action known as defuzzification.
We can observe that the action of forming a logic question is an inductive step, and the act of answering a logic question via one or more conditions upon which the question depends, is an example of a deductive step.
Examples are shown further in this paper of logic tables answering logic questions.

Logic Tables
We define logic tables in this paper by Definition 3.1. We may think of a logic table as accepting some specific input I = {i 0 , i 1 , i 2 , ..., i i } where each element of the set I is assigned some logic value. Then the items in the set I are implicitly interpreted as having a subjective meaning (e.g. health, shields, distance, etc.) and so the set I represents a specific situation within which the logic table is able to produce some specific output O which is itself a single logic value. Like the input values, the output value also has a subjective meaning which can be interpreted as either a computation or a contemplation of logic, so the logic table is said to output the answer to a logic question. Table" consists of: We then describe how a logic table can be constructed and an equation produced which computationally maps the configured inputs to the configured outputs, and we apply the process to produce a mathematical programming of a game character's logic.

Disjunctive Normal Form (DNF)
We can make use of the AND, OR, and NOT 2 operators by applying an established technique from [5] whereby an I → O mapping is listed in a logic table, and a formula in terms of AND, OR, and NOT is written which computes the outputs depicted in the table when their directly-related inputs are presented to the equation. The equation produced is said to be in Disjunctive Normal Form (DNF) after [7].
Then an algorithm whereby that process is most traditionally accomplished is depicted in Algorithm 1, and an algorithm depicting use of XNOR is depicted in Algorithm 2.
An example of the equations produced by Algorithms 1 and 2 are shown through Example 4.1.
Example 4.1 Given an arbitrary logic table, such as the XOR operation: (NOT(X) AND Y) OR (X AND NOT(Y)) 2 We then use XNOR instead of NOT in order to compose the DNF equation in a more customizable form. if O j = 0 then 5:

Algorithm 1 Produce DNF Equation from Logic
Let term = 1 6: for each input i ∈I do 7: if M i,j = 0 then  (XNOR(X,0) AND XNOR(Y,1)) OR (XNOR(X,1) AND XNOR(Y,0)) We observe that the additional parameter on the XNOR operation is itself the value from the logic table, and we observe by Theorem 4.4 that the equation utilizing XNOR is identical to the equation utilizing NOT.
The outputs O 1 and O 2 produce separate classical DNF equations by Algorithm 1 as:

Extensions to continuous logic
We find continuous mathematical definitions for classical Boolean operators remaining relatively unchanged from history, with the definition of NOT, AND, and OR going as far back as [1] and [2].
When selecting continuous mathematical functions that compute NOT, AND, OR, and XNOR, we may then seek any of those functions that produce the same {0,1} output values for any given {0,1} input values, and consider alternatives 3 to the definitions here as affecting the values produced between 0 and 1. We analyze and observe the results. In particular, we examine the following: The complement of a logical quantity produces a depiction of its lack of contribution to a whole truth.
The multiplication of two logical quantities produces a depiction of their mutual contribution to a whole truth.
The capped addition of two logical quantities produces a depiction of an independent contribution of each quantity toward a whole truth.
The XNOR of two logical quantities produces a depiction of the extent as to which two logical quantities agree toward the value of a truth.
Where the operator ⊕ denoted here is addition restricted to the range [0,1], the XNOR function is labeled EQ for clarity 4 , i provides inference control and is the subject of a further section of the paper, and the operator |x| denotes the absolute value operator.
We can then rewrite Solution 4.3 to produce the equation shown in Solution 5.5 which we call the continuous form of its logical expression. (EQ(X, 0) * EQ(Y, 1)) ⊕ (EQ(X, 1) * EQ(Y, 0)) When graphed the equation from Solution 5.5 produces the surface depicted in Figure 1 and matches the expected output of its definition from Example 4.1, which is the XOR function.
We next apply a trivial arithmetic operation to cause each term of the equations emitted by Algorithm 2 to support arbitrary row outputs which can be configured to be in the range [0,1]. We accomplish that by applying a multiplier to each term, thereby transforming whether the term matches its configured values, into what we want the term to output given that it matches its configured values, producing the listing in Algorithm 3.  We apply a multiplier to each term and observe that the output interpolates to express the values depicted in the multipliers. We can form a table as follows: Proof: We seek to demonstrate multidimensional interpolation in a proof by induction. We start by generating and expanding a logic table of a single variable and output as follows...

Provision for continuous outputs
...observing that the output of the term will match the value configured in O 0 when the value of the input X matches the value of the table value M 0,0 . We observe also that as X deviates from M 0,0 , that less of the output value O 0 contributes to the output of the equation. We add an additional variable to the equation, still with only a single row, and we produce the following... ...observing that the quantity (X, Y ) must match (M 0,0 , M 1,0 ) for the equation to produce the value O 0 on its output. It follows that for each additional variable we input into the equation that an additional quantity must be matched in the currently single row of the table in order for the configured output to be emitted. We next add an additional row to the logic table, producing an OR condition on the recognition of that row...
...and we observe that the output of the equation approaches O 0 to the extent that (X, Y ) approaches (M 0 , M 1 ), while also approaching the value of O 1 to the extent that the quantity (X, Y ) approaches (M 0,1 , M 1,1 ), resulting in an interpolation between the values depicted in the output array O j .
We next provision the formula with support for unknowns, and crisp state values, and finally show examples.

Provision for unknowns
We have observed what we might call Boolean Values, e.g. { x : x ∈{ 0, 1 } }, and Continuous Values, e.g. { z : z ∈[0,1] }, and we next provision with support for additional data as defined as follows.
In particular we produce Algorithm 4 to allow for the special value UNKNOWN, enabling the machine to be configured so as to not necessitate a full connection of all its inputs to outputs.  The level of inference can be controlled by using a modifier supplied in the extended description of the XNOR operator in Definition 5.4.

Algorithm 4 Production of a "Continuous Form" Equation from Logic
Accordingly the EQ function is augmented in Algorithm 6 to support inference control modifiers.
Algorithm 6 EQ w/ support for "inference control" We approach the answer to Problem 10.1 in Solution 10.2 by constructing a series of sets of arbitrary information that will be required to produce the sets needed for the logic tables. In particular we are depicting a Fuzzy Control System process as in [4].
We will let W = {w 1 , w 2 , w 3 , ..., w w } be the set of arbitrary "real world" values that the character may perceive. These are quantities which may be considered to be of any form or composition. The set W for this example is then given in Table 5. The P = (x, y) position of the robot. w 1 The F =< x, y > normalized vector in the forward facing direction of the robot. w 2 The R =< x, y > normalized direction to the robot's right 5 . w 3 The Q = (x, y) position of the robot's current target 6 w 4 The D distance to the robot's current target. w 5 The B = (x, y) position of the soccer ball. w 6 The G = (x, y) position of the goal. w 7 An H ∈{0,1} indicator of whether the ball is "held". w 8 The V = (Q − P )/|Q − P | normalized vector from the robot to the current target. w 9 The F · V dot product of the robot's forward vector with the vector to the target. w 10 The R· V dot product of the robot's right vector with the vector to the target.
Our next step is to apply a normalization of the values from W into the character's [0,1] logic space. This step is called the fuzzification step after [4].
Then let the set S = {s 1 , s 2 , s 3 , ..., s s } be the arbitrary set of normalized sensor values. These are continuous logic values on the range [0,1] and represent continuous Boolean logic (to distinguish it from discrete Boolean logic). We infer this set of values from the set W as shown in Table 6.
Where the miscellaneous mathematical functions such as "clamp" and "map" are listed in Table 7, and are being used to perform the conversion W → S, and are called fuzzification functions. We observe that there may exist many such functions.
We may then define a series of continuous logic tables to describe each possible output behavior of the character as given in Solution 10.2. Where should I target (X,Y)?
We then, at periodic intervals update the sets W and S, and compute a set Z to contain the answer to the questions depicted in the logic tables, which we may then directly "defuzzify" into motive actions. In particular, we may multiply the logic value of whether to drive forward with a value representing how fast to travel at maximum, and apply it to the character's position causing the character to travel forward. We may also defuzzify the logical quantities about turning right or left by multiplying each of them by a quantity depicting how much to turn at maximum, and then turning in whichever direction represents a greater recommendation value, and we may defuzzify the logical quantity about throwing the ball, by evaluating whether it exceeds a threshold value (such as 0.90). We pick up the ball when the character is sufficiently close to it, setting the appropriate world variable, w 7 , to 1, and release the ball when the character decides to throw it by setting the variable to 0, and we apply motion to the ball depicting it thrown. We can then reset the position of the ball, or indeed, keep it at its arbitrary place on the field, and we observe that the character plays a primitive game of soccer, picking up the ball, carrying it to, and throwing it in the goal, and will continue doing so perpetually as long as the character runs.
11 Application to arbitrary range, precision, and dimensionality First, to provide an input to the logic system on the arbitrary range [0,b], the input value is downscaled into the internal range [0,1] whilst being input into the system by performing a division of its ranged value b, and taking its absolute value. In that way the arbitrary range [0,b] is supported while internally the logic system operates on the range [0,1]. Given that, an input value X of range [-1,1] can be constructed out of two separate internal input values X a [0,1], and X b [0,1], such that when X is between -1 and 0 the absolute of its value is supplied to the X a input, and when X is between 0 and 1 it is supplied to the X b input thereby allowing the logic system to internally operate on the range

Application to "hard" questions
At this point the reader might wonder why the initial logic questions in Problem 10.1 are answered with the fuzzification functions "map" and "clamp" rather than with logic tables, and the answer is that they are deemed atomic questions, as defined in Definition 2.5, and so are such readily answerable that they do not require the methods of logic tables described in the paper to produce their answers. Contrarily, the questions answered further in Problem 10.1 are in and of themselves not so clear in how to produce their answers, but are considered "moderate questions" in that their being answered is indicated in utilizing a single logic table. Then, there exists a category of logic questions that we may call "hard questions" that are so complicated that we cannot immediately imagine them requiring a single logic table, though they potentially could, but we imagine their answers as requiring two or more logic tables, not merely of a composite result, but of a hierarchy of logic tables where each contributes in its own way toward the cumulative answer.
As it happens, there exists an interesting technique employed by the author whereby a hierarchy of logic tables may be constructed so as to produce the answer to such a hard question. We begin with the hard question unconfigured, which we consider could be any question that is indicated to produce an answer that is deemed a logic value, and we next recursively split the hard question into further questions that the hard question depends upon, and we observe that the dependent questions are of a lower or equal difficulty than the hard question itself (for if they were more difficult, the original question would be deemed itself even more difficult further by cumulative laws of composition), such that they may be atomic questions, moderate questions, or hard questions of their own. We then recursively split each of the remaining questions into further questions, and so on, until we encounter a total set of atomic questions whose answers feed as inputs into the moderate or hard questions which they were split from, whose own answers are then fed into the questions they were split from, and so on, until we have a hierarchy depicting the answer to the original hard question, or else we have encountered either an infinite loop, or an inability to split a question, in which case the original question is not computable, at least at the present time with the available information at hand (something that should never occur in answerable questions).

Application to machine learning
Machine learning can be accomplished on these logic constructs via the dynamic insertion of rows into the logic table matrices. In particular an interesting form of machine learning exists whereby a human operates the artificially intelligent agent and the sensor values as they are at the time of the human's motor inputs are inserted into the appropriate logic table matrices.
For example, and as for the example in this paper, a human might press forward, left, right, or a button indicating whether to throw the ball, and the soccer robot's sensor values pertaining to whether the goal is to the right or left, forward, ball held, and etc. are inserted into the appropriate logic table corresponding to the human's particular input, e.g. the logic tables that indicate whether to drive forward, left, right, throw the ball, and etc.
Additional sensors e.g. the placement of opponents on the field can be pruned from their insertion according to contradictions on input, for example if a character is now right when they were once left they can be recognized as not relevent to the input because their value is so varied across training examples, thereby serving refinement in hope of a reduced most set of sensor inputs to be considered at any given time.
Additionally the sensor inputs may be quantized onto strict increments, e.g. 0.1, 0.2, etc. so that the human may retain the input button down and not overwhelm the matrix with a multitude of sensor values. In this manner the human may thereby passively and simply play a game of robot soccer and observe that the machine has in that fashion "learned" to play the game of soccer in the same fashion, including passing the ball, defensive and offensive participation, and indeed every behavior and action committed by the human subject to the sufficient set of sensors available to the intelligent character. This method of learning has been titled "observation training" by the author, and familiarly titled "Monkey See Monkey Do". The example as just described has been implemented and verified by the author, but it can also be imagined that an airplane with sufficient sensors can in the same fashion learn to land itself by being landed by a human multiple times provided it is sufficiently tuned in regard to which sensors are necessary to pay attention to at any given time. The act of reducing the sensors is a particular problem but has had some success in refining via identifying contradictions on input as described, e.g. the human presses left in a situation where they pressed right previously, or a particular sensor's range of values exceeds a certain range and so is considered to not be meaningful enough. This problem appears to compound as the number of available sensors increases and could be the subject of further analysis. Nevertheless the author believes that the foundation described as such in this paper provides sufficient support for a theory of contemplation.