Class:
Navigation:
 0-0     
Instance:
Relationship:
Domain:
Links:
Automated Pattern Deduction for Connect 4 in 2 Moves (version 0.128 2024-12-20)

Step 0. Initial
game.connects4InMoves(player, 2) = true 
Step 1. The system substitutes game.connects4InMoves(player, 2) with its predefined equivalence definition <=>
∀ xMove: (Start For All Move Concept)
  xMove >= 0 and 
  xMove < xMax and 
  game.matrix.yEmpty(xMove) < yMax - 1:
  game.afterMove(xMove).connects4InMoves(player, 1) = true
∀end xMove (End For All Move Concept) 
Step 2. The system substitutes connects4InMoves(player, 1) with its deduced equivalence definition <=>
∀ xMove: (Start For All Move Concept)
  xMove >= 0 and 
  xMove < xMax and 
  game.matrix.yEmpty(xMove) < yMax - 1:
  game.afterMove(xMove).matrix.reppp(player, 0, rex) = true and 
  game.afterMove(xMove).toMove = player and 
  game.afterMove(xMove).matrix.pppp(opponent(player)) = false
∀end xMove (End For All Move Concept) 
Step 3. The system substitutes the game.afterMove(xMove).* functions with their deduced equivalence definitions <=>
∀ xMove: (Start For All Move Concept)
  xMove >= 0 and 
  xMove < xMax and 
  game.matrix.yEmpty(xMove) < yMax - 1:
  ((xMove = rex and 
  game.matrix.reppp(player, 1, xMove) = true) or 
  (xMove != rex and 
  game.matrix.reppp(player, 0, rex) = true) or 
  (game.toMove = player and 
  game.matrix.rerepp(player, 0, xMove, 0, re2x) = true) or 
  (game.toMove = player and 
  game.matrix.vrep(player, 1, xMove) = true)) and 
  game.toMove = opponent(player) and 
  ((game.matrix.reppp(opponent(player), 0, xMove) = false or 
  game.toMove = player) and 
  game.matrix.pppp(opponent(player)) = false)
∀end xMove (End For All Move Concept) 
Step 4. The system eliminates the ored game.toMove = player rule and anded game.toMove = player containing ored rules, in red above, because it contradicts the absolute game.toMove = opponent(player) rule, in green above. <=>
∀ xMove: (Start For All Move Concept)
  xMove >= 0 and 
  xMove < xMax and 
  game.matrix.yEmpty(xMove) < yMax - 1:
  ((xMove = rex and 
  game.matrix.reppp(player, 1, xMove) = true) or 
  (xMove != rex and 
  game.matrix.reppp(player, 0, rex) = true)) and 
  game.toMove = opponent(player) and 
  game.matrix.reppp(opponent(player), 0, xMove) = false and 
  game.matrix.pppp(opponent(player)) = false
∀end xMove (End For All Move Concept) 
Step 5. The system exports game.toMove = opponent(player) and game.matrix.pppp(opponent(player)) = false out of the for all move concept since these rules are independent of xMove. The system exports game.matrix.reppp(opponent(player), 0, xMove) = false out of the for all move concept because this rule being false for any unbound rex is equivalent with it being false for all xMove binding this rule via rex. In the latter exported rule the variable name xMove is replaced with the variable name rex to avoid confusion with xMove from the all move concept. <=>
∀ xMove: (Start For All Move Concept)
  xMove >= 0 and 
  xMove < xMax and 
  game.matrix.yEmpty(xMove) < yMax - 1:
  ((xMove = rex and 
  game.matrix.reppp(player, 1, xMove) = true) or 
  (xMove != rex and 
  game.matrix.reppp(player, 0, rex) = true))
∀end xMove (End For All Move Concept) and 
game.toMove = opponent(player) and 
game.matrix.reppp(opponent(player), 0, rex) = false and 
game.matrix.pppp(opponent(player)) = false 
Step 6. The system splits up the for all move concept into three parts each part being able to realise the for all move concept. The second ored rule (xMove != rex and game.matrix.reppp(player, 0, rex) = true) can realize for all xMove if for every xMove there exists a rex different from xMove with game.matrix.reppp(player, 0, rex) = true. This rule could stay in the for all xMove concept, but further deduction leads to two equivalent more conscise and insightful parts (part two and three) that can be exported out of the for all xMove. Part two is two re0ppp patterns with different rex which ensures for every xMove there exists a re0ppp with its rex different from xMove. Part three is a re1ppp and re0ppp with the same rex, thus on top of eachother. For every xMove different from this common rex the re0ppp realizes the condition. For xMove equal to the common rex the re1ppp pattern transforms into re0ppp realizing the condition. Part one is then the for all xMove itself with the remaining ored rule game.matrix.reppp(player, 1, xMove) = true. To part one the rule game.matrix.reppp(player, 1, rex) is added because at least one re1ppp pattern has to exist. This is the final step of the 4 in 2 moves deduction since its result is a minimal and normalised definition in terms of patterns on game.matrix with all references to game.afterMove(xMove) eliminated. <=>
((∀ xMove: (Start For All Move Concept)
  xMove >= 0 and 
  xMove < xMax and 
  game.matrix.yEmpty(xMove) < yMax - 1:
  game.matrix.reppp(player, 1, xMove) = true
∀end xMove (End For All Move Concept) and 
game.matrix.reppp(player, 1, rex) = true) or 
(x1 != x2 and 
game.matrix.reppp(player, 0, x1) = true and 
game.matrix.reppp(player, 0, x2) = true) or 
(game.matrix.reppp(player, 1, xs) = true and 
game.matrix.reppp(player, 0, xs) = true)) and 
game.toMove = opponent(player) and 
game.matrix.reppp(opponent(player), 0, rex) = false and 
game.matrix.pppp(opponent(player)) = false 

Connect Four Classes, Rules, Quantifiers and Predefined and Deduced Pattern Functions
xMax = 7
yMax = 6
conn = 4
opponent(1) = 2
opponent(2) = 1

game.connects4InMoves(player, 1) <=> (Predefined Pattern Function)
Ǝ xMove: (Start Exists Move Concept)
  xMove >= 0 and 
  xMove < xMax:
  game.afterMove(xMove).connects4InMoves(player, 0) = true
Ǝend xMove (End Exists Move Concept) and 
game.toMove = player and 
game.matrix.pppp(opponent(player)) = false
game.connects4InMoves(player, 2) <=> (Predefined Pattern Function) ∀ xMove: (Start For All Move Concept) xMove >= 0 and xMove < xMax and game.matrix.yEmpty(xMove) < yMax - 1: game.afterMove(xMove).connects4InMoves(player, 1) = true ∀end xMove (End For All Move Concept)
game.connects4InMoves(player, 3) <=> (Predefined Pattern Function) Ǝ xExistsMove: (Start Exists Move Concept) xExistsMove >= 0 and xExistsMove < xMax: game.afterMove(xExistsMove).connects4InMoves(player, 2) = true Ǝend xExistsMove (End Exists Move Concept) and game.connects4InMoves(player, 1) = false
game.connects4InMoves(player, 4) <=> (Predefined Pattern Function) ∀ xAll4Move: (Start For All Move Concept) xAll4Move >= 0 and xAll4Move < xMax and game.matrix.yEmpty(xAll4Move) < yMax - 1: game.afterMove(xAll4Move).connects4InMoves(player, 3) = true ∀end xAll4Move (End For All Move Concept)
matrix.pppp(player) <=> (Predefined Pattern Function) Ǝ x0, y0: (Start Vertical Pattern with bottom coordinates x0, y0) x0 >= 0 and x0 < xMax and y0 >= 0 and y0 < yMax - conn: ∀ extent: (Start All Extent: Connect in a Vertical Row Pattern) extent >= 0 and extent < conn: matrix(x0, y0 + extent) = player ∀end extent (End All Extent: Connect in a Vertical Row Pattern) and matrix.yEmpty(x0) = y0 + conn Ǝend x0, y0 (End Vertical Pattern with bottom coordinates x0, y0) or Ǝ x0, y0: (Start Horizontal Pattern with left coordinates x0, y0) x0 >= 0 and x0 < xMax - conn and y0 >= 0 and y0 < yMax: ∀ extent: (Start All Extent: Connect in a Horizontal Row Pattern) extent >= 0 and extent < conn: matrix(x0 + extent, y0) = player ∀end extent (End All Extent: Connect in a Horizontal Row Pattern) and Ǝ pmEx: (Start Exists Previous Move Extent with Empty Position Above) pmEx >= 0 and pmEx < conn: matrix.yEmpty(x0 + pmEx) = y0 + 1 Ǝend pmEx (End Exists Previous Move Extent with Empty Position Above) Ǝend x0, y0 (End Horizontal Pattern with left coordinates x0, y0) or Ǝ x0, y0: (Start Diagonal Up Pattern with bottom-left coordinates x0, y0) x0 >= 0 and x0 < xMax - conn and y0 >= 0 and y0 < yMax - conn: ∀ extent: (Start All Extent: Connect in a Diagonal Up Row Pattern) extent >= 0 and extent < conn: matrix(x0 + extent, y0 + extent) = player ∀end extent (End All Extent: Connect in a Diagonal Up Row Pattern) and Ǝ pmEx: (Start Exists Previous Move Extent with Empty Position Above) pmEx >= 0 and pmEx < conn: matrix.yEmpty(x0 + pmEx) = y0 + pmEx + 1 Ǝend pmEx (End Exists Previous Move Extent with Empty Position Above) Ǝend x0, y0 (End Diagonal Up Pattern with bottom-left coordinates x0, y0) or Ǝ x0, y0: (Start Diagonal Down Pattern with top-left coordinates x0, y0) x0 >= 0 and x0 < xMax - conn and y0 >= conn and y0 < yMax: ∀ extent: (Start All Extent: Connect in a Diagonal Down Row Pattern) extent >= 0 and extent < conn: matrix(x0 + extent, y0 - extent) = player ∀end extent (End All Extent: Connect in a Diagonal Down Row Pattern) and Ǝ pmEx: (Start Exists Previous Move Extent with Empty Position Above) pmEx >= 0 and pmEx < conn: matrix.yEmpty(x0 + pmEx) = y0 - pmEx + 1 Ǝend pmEx (End Exists Previous Move Extent with Empty Position Above) Ǝend x0, y0 (End Diagonal Down Pattern with top-left coordinates x0, y0)
game.connects4InMoves(player, 0) <=> (Predefined Pattern Function) game.matrix.pppp(player) = true and game.toMove = opponent(player)
game.afterMove(xMove) <=> (Predefined Pattern Function) game.matrix.yEmpty(xMove) < yMax - 1 and game.afterMove(xMove).toMove = opponent(game.toMove) and game.afterMove(xMove).matrix(xMove, game.matrix.yEmpty(xMove)) = game.toMove and game.afterMove(xMove).matrix.yEmpty(xMove) = game.matrix.yEmpty(xMove) + 1 and ∀ x, y: (Start Matrix after move equals matrix before move except the new Disk) x >= 0 and x < xMax and y >= 0 and y < yMax and (x != xMove or y != game.matrix.yEmpty(xMove)): game.afterMove(xMove).matrix(x, y) = game.matrix(x, y) ∀end x, y (End Matrix after move equals matrix before move except the new Disk)
matrix.reppp(player, red, rex) <=> (Predefined Pattern Function) Ǝ x0, y0: (Start Vertical Pattern with bottom coordinates x0, y0) x0 >= 0 and x0 < xMax and y0 >= 0 and y0 < yMax - conn: ∀ extent: (Start All Extent: Connect in a Vertical Row Pattern) extent >= 0 and extent < conn - 1: matrix(x0, y0 + extent) = player ∀end extent (End All Extent: Connect in a Vertical Row Pattern) and matrix.yEmpty(rex) = y0 + conn - 1 - red and rex = x0 Ǝend x0, y0 (End Vertical Pattern with bottom coordinates x0, y0) or Ǝ x0, y0: (Start Horizontal Pattern with left coordinates x0, y0) x0 >= 0 and x0 < xMax - conn and y0 >= 0 and y0 < yMax: ∀ extent: (Start All Extent: Connect in a Horizontal Row Pattern) extent >= 0 and extent < conn and extent != rexEx: matrix(x0 + extent, y0) = player ∀end extent (End All Extent: Connect in a Horizontal Row Pattern) and Ǝ rexEx: (Start re0 Extent: Extent of the Rotatable Empty position in the re0ppp Pattern) rexEx >= 0 and rexEx < conn: matrix.yEmpty(rex) = y0 - red and rex = x0 + rexEx Ǝend rexEx (End re0 Extent: Extent of the Rotatable Empty position in the re0ppp Pattern) Ǝend x0, y0 (End Horizontal Pattern with left coordinates x0, y0) or Ǝ x0, y0: (Start Diagonal Up Pattern with bottom-left coordinates x0, y0) x0 >= 0 and x0 < xMax - conn and y0 >= 0 and y0 < yMax - conn: ∀ extent: (Start All Extent: Connect in a Diagonal Up Row Pattern) extent >= 0 and extent < conn and extent != rexEx: matrix(x0 + extent, y0 + extent) = player ∀end extent (End All Extent: Connect in a Diagonal Up Row Pattern) and Ǝ rexEx: (Start re0 Extent: Extent of the Rotatable Empty position in the re0ppp Pattern) rexEx >= 0 and rexEx < conn: matrix.yEmpty(rex) = y0 + rexEx - red and rex = x0 + rexEx Ǝend rexEx (End re0 Extent: Extent of the Rotatable Empty position in the re0ppp Pattern) Ǝend x0, y0 (End Diagonal Up Pattern with bottom-left coordinates x0, y0) or Ǝ x0, y0: (Start Diagonal Down Pattern with top-left coordinates x0, y0) x0 >= 0 and x0 < xMax - conn and y0 >= conn and y0 < yMax: ∀ extent: (Start All Extent: Connect in a Diagonal Down Row Pattern) extent >= 0 and extent < conn and extent != rexEx: matrix(x0 + extent, y0 - extent) = player ∀end extent (End All Extent: Connect in a Diagonal Down Row Pattern) and Ǝ rexEx: (Start re0 Extent: Extent of the Rotatable Empty position in the re0ppp Pattern) rexEx >= 0 and rexEx < conn: matrix.yEmpty(rex) = y0 - rexEx - red and rex = x0 + rexEx Ǝend rexEx (End re0 Extent: Extent of the Rotatable Empty position in the re0ppp Pattern) Ǝend x0, y0 (End Diagonal Down Pattern with top-left coordinates x0, y0)
game.connects4InMoves(player, 1) = true <=> (Deduced Pattern) game.matrix.reppp(player, 0, rex) = true and game.toMove = player and game.matrix.pppp(opponent(player)) = false
game.afterMove(xMove).matrix.pppp(player) = true <=> (Deduced Pattern) ((game.matrix.reppp(player, 0, xMove) = true and game.toMove = player) or game.matrix.pppp(player) = true)
game.afterMove(xMove).matrix.reppp(player, 0, rex) = true <=> (Deduced Pattern) ((xMove = rex and game.matrix.reppp(player, 1, xMove) = true) or (xMove != rex and game.matrix.reppp(player, 0, rex) = true) or (game.toMove = player and game.matrix.rerepp(player, 0, xMove, 0, re2x) = true) or (game.toMove = player and game.matrix.vrep(player, 1, xMove) = true))
game.afterMove(xMove).matrix.reppp(player, 1, rex) = true <=> (Deduced Pattern) ((xMove = rex and game.matrix.reppp(player, 2, xMove) = true) or (xMove != rex and game.matrix.reppp(player, 1, rex) = true) or (game.toMove = player and game.matrix.rerepp(player, 0, xMove, 1, rex) = true))
game.afterMove(xMove).matrix.reppp(player, 2, rex) = true <=> (Deduced Pattern) ((xMove = rex and game.matrix.reppp(player, 3, xMove) = true) or (xMove != rex and game.matrix.reppp(player, 2, rex) = true) or (game.toMove = player and game.matrix.rerepp(player, 0, xMove, 2, rex) = true))
game.afterMove(xMove).matrix.rerepp(player, 0, re1x, 1, re2x) = true <=> (Deduced Pattern) ((xMove = re1x and game.matrix.rerepp(player, 1, xMove, 1, re2x) = true) or (xMove = re2x and game.matrix.rerepp(player, 0, re1x, 2, xMove) = true) or (xMove != re1x and xMove != re2x and game.matrix.rerepp(player, 0, re1x, 1, re2x) = true) or (game.toMove = player and game.matrix.rererep(player, 0, xMove, 0, re2x, 1, re3x) = true) or (game.toMove = player and game.matrix.rererep(player, 0, re1x, 0, xMove, 1, re3x) = true) or (game.toMove = player and game.matrix.vrep(player, 2, xMove) = true))
game.afterMove(xMove).toMove = player <=> (Deduced Pattern) game.toMove = opponent(player)
game.afterMove(xMove).toMove = opponent(player) <=> (Deduced Pattern) game.toMove = player
game.connects4InMoves(player, 2) <=> (Deduced Pattern) ((∀ xMove: (Start For All Move Concept) xMove >= 0 and xMove < xMax and game.matrix.yEmpty(xMove) < yMax - 1: game.matrix.reppp(player, 1, xMove) = true ∀end xMove (End For All Move Concept) and game.matrix.reppp(player, 1, rex) = true) or (x1 != x2 and game.matrix.reppp(player, 0, x1) = true and game.matrix.reppp(player, 0, x2) = true) or (game.matrix.reppp(player, 1, xs) = true and game.matrix.reppp(player, 0, xs) = true)) and game.toMove = opponent(player) and game.matrix.reppp(opponent(player), 0, rex) = false and game.matrix.pppp(opponent(player)) = false
Informational Add: Why deflate the parasitic system? Because the parasitic-destructiveness of oversized states and corporations always leads to decay, corruption, injustice, ..., to the destruction of its many hosts, the people, the working and creative people, the maimed and dying slaves of the elites. See examples below.

Informational Add: Pattern Deduction AI in Connect Four 2023-09-21: An AI trying to do it the Human way - Pattern re0ppp
I think the concept of pattern deduction will be a central and main paradigm in AI because it does not depend on huge computing power and memory size as brute force AI does. In fact pattern deduction is an attempt to simulate a more human and as such smarter form of modelling and reasoning than brute force: an AI trying to do it the human way.

Informational Add: The Parasitic System 2024-08-07: They simply evolve their-selves to extinction. Darwin at work.

Informational Add: Lokaal ruilen is een onontbeerlijke methode om het parasitaire systeem te deflateren!

Informational Add: Flemish Tasty Forest 2023: 160 m2 wild food forest and food garden - harvest score 2023-11-06

Informational Add: The Parasitic System 2023-12-13: Lets Deflate the Parasitic System!

Informational Add: Pattern Deduction AI Connect 4 in 2 Moves: An AI trying to do it the Human way-re1ppp-re0ppp
I think the concept of pattern deduction will be a central and main paradigm in AI because it does not depend on huge computing power and memory size as brute force AI does. In fact pattern deduction is an attempt to simulate a more human and as such smarter form of modelling and reasoning than brute force: an AI trying to do it the human way.

Informational Add: Tumia.org is hosted and powered by One.com. Start your website with one.com - Start building your dream online with an easy-to-use and affordable website builder.

Informational Add: More Dangerous Sars-Cov-2 variants by creating biological niches for those variants and by Vaids?
Design & Copyright 2010-2023: www.tumia.org - LAMP page generated in 0.010998 seconds. - Tribute to Mama, Papa, ... - 
Share
Informational Add Above
>>


Most hyperlinks for navigating on Tumia are implemented using Javascript. Nevertheless to enable crawlers to easily recognize those hyperlinks they also have been added in this section as plain html href hyperlinks. The latter hyperlinks are however not very useful and hence not recommended for navigating on Tumia.

|< <-- --> EN FR NL SW Ascot Residence Watamu of class Accommodation Brussels Airlines of class Airline Cat of class Animal The Belgian Monkey Caste of class Article Bamburi nature park of class Attraction Level 1 Internet Domains in Tumia of class Chart Earth Global Warming 2000 AD of class Climate Change Connect Four:PEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE of class Connect Four Connect Four Test Webpage of class Connect Four Test Australia of class Country Growing Beans of class Cultivation Hydroelectricity of class Energy 00e89d5.netsolhost.com of class Internet Domain java.lang.Object of class Java Class java Object.equals(java.lang.Object) checks an operator enum of class Java Code Example java.lang.Object.clone() of class Java Method Dentist Joblist in Belgium of class Joblist Airfare Comparison of class Knowledge The Dutch Language of class Language Articles in Dutch of class Learning Goal Pattern Deduction: Connect 4 in 1 Move of class Pattern Deduction Connect 4 Pattern Set 0.s.1 of class Pattern Set Connect 4 Ecosystem Pset Feed on Figs of class Pattern Set Ecosystem Bob Marley of class Person a Belgian Callbus of class Picture 's-Hertogenbosch of class Place Muffin of class Recipe Christianity of class Religion Advertising of class Sector Benelux of class Union of Countries Human-Caused Poisoning of Life and Earth: Poisoned Fields - Glyphosate, the underrated risk? of class Video Learning Geography: Maps of Belgium in Dutch of class Video Playlist Pattern Deduction: Connect 4 in 1 Move Pattern Deduction: Connect 4 in 2 Moves Pattern Deduction: Connect 4 in 3 Moves Pattern Deduction: Connect 4 in 4 Moves