|
Pattern Deduction AI in Connect Four in 3 Moves 2024-09-24: An AI trying to do it the Human way - Patterns re0re1pp, re0re0pp, re2ppp, re1ppp, re0ppp and pppp
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. Further on the plan is to apply and expand this pattern deduction AI framework on connect four with higher dimensions (unsolvable by brute force AI), chemistry, biochemistry, ecosystems, ... .
The automated pattern deduction for connect four in 1 and 2 moves is done. Next up in this article is discovery and automation of the pattern deduction for connect four in 3 moves. See the following links for the connect 4 in 2 and 1 moves Tumia articles and some other relevant information:
https://tumia.org/en/directory/en/instance.php?tiname=
Pattern%20Deduction%20AI%20Connect%204%20in%202%202024-09-08:%20
An%20AI%20trying%20to%20do%20it%20the%20Human%20way%20-%20re1ppp-re0ppp
&relationship=All&drsid=0&pisid=0&page=1
http://tumia.org/en/directory/en/instance.php?tiname=
Pattern%20Deduction%20AI%20in%20Connect%20Four%202023-09-21:
%20An%20AI%20trying%20to%20do%20it%20the%20Human%20way-Pattern%20re0ppp
&tiname_sel=&relationship=All&drsid=0&pisid=0&tiname_dno=1&page=1
See these links for the automated pattern deduction for connect four in 2 and 1 moves:
http://tumia.org/en/directory/en/instance.php?tiname=
Pattern%20Deduction:%20Connect%204%20in%202%20Moves
&tiname_sel=&relationship=All&drsid=0&pisid=0&tiname_dno=1&page=1
http://tumia.org/en/directory/en/instance.php?tiname=
Pattern%20Deduction:%20Connect%204%20in%201%20Move
&relationship=All&drsid=0&pisid=0&page=1
See these link for the automated pattern deduction for connect four in 3 moves on Tumia and video of this article on Rumble and the wayback machine:
https://tumia.org/en/directory/en/instance.php?tiname=
Pattern%20Deduction:%20Connect%204%20in%203%20Moves
&tiname_sel=&relationship=All&drsid=0&pisid=0&tiname_dno=1&page=1
Video:
https://rumble.com/v5lobsq-pattern-deduction-ai-
connect-4-in-3-moves-re0re1pp-re0re0pp-re2ppp-re1ppp-r.html
http://web.archive.org/web/20241215141644/https://
rumble.com/v5lobsq-pattern-deduction-ai-connect-4-in-3-moves-
re0re1pp-re0re0pp-re2ppp-re1ppp-r.html?e9s=src_v1_ucp
A pattern set (pset) is a cohesive set of patterns realising a win in x moves. A standalone pset is a pset that does not depend on extra conditions for all the remaining columns of the board. An all columns pset does depend on extra conditions for all the remaining columns of the board.
There exist one main path for deducing standalone psets going from connects 4 in 2 to connects 4 in 3 moves (2->3 winning moves, also 0->1, ...). In other words one main path for deducing the standalone psets for connects 4 in 3 from the psets of connects 4 in 2 moves. This is the omission path or in the opposite direction, from 3 to 2 winning moves, the completion path. For example pppp is the one pset of 4 in 0 moves. Player completed pppp with its previous move. To backtrack this one move one p has to be omitted from pppp and replaced by an empty position. As such re0ppp is deduced by ommission of a p from pppp.
According to the human intelligence elaborations of my own brain the above pattern deduction 4 in 3 moves results in the following psets each of them implying a win in 3 moves:
All Columns Pset 3.1
All Columns Pset 3.1 There exists on the game matrix re2ppp pattern(s) for exactly one column (one re2). The player moves on this re2. All the other columns are closed or have a re1ppp pattern. See this example with screenshot further down:
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PSSPPSESPPSSPEPSSSPPESPPSSPEPSSPPSESPPSSPEP
&relationship=All&drsid=0&pisid=0&page=1
All Columns Pset 3.2
All Columns Pset 3.2 There exists at least one re1ppp pattern and exactly one column with one empty position on the game matrix. All the other columns are closed or have a re1ppp pattern. See these examples with screenshot further down:
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PSSPPSPSPPSSPEPSSSPPESPPSSPEPSSPPSESPPSSPEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:SSPSSSPPPPSPPSSESPSSPPESSPPESEPSSSEPEEPPPES
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:SSPSSPPPPPSPPSESPPSSSEPSSPPSESPSSSPEPSSPPEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PSPSSSPPSPSPPSSSPPSSPPPSSPPSSSEPSSPPEEPPPSS
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:SSSPSPSPPPSSSPPESPPSPPEPSPPSSEPPSSPPESESPSS
&relationship=All&drsid=0&pisid=0&page=1
On Twitter:
https://x.com/nesta_red/status/1858069496549761238
All Columns Pset 3.3
All Columns Pset 3.3 The player moves on a column with one empty position that corresponds with the re0 position of a re0re1pp pattern. As such re0re1pp is transformed into re1ppp. All the other columns, different from re0 and re1 of the re0re1pp pattern, are closed or have a re1ppp pattern. See this example with screenshot further down:
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PSPSSSPPPPSPPSSSPPSSPPSSSPPSSSSEPSSEPPEEPPE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PSPSSSPPPPSPPSSPPPSSPPSSSPPSSSSPSSPEPSSPEPE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PSPSSSPPPPSPPSSPPPSSPPSSSPSSPSSPSSPEPSSEPPE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PSPSSPPPPSPPPSEPPPSSPESSSPSPESSPSPPEPSSESSE
&relationship=All&drsid=0&pisid=0&page=1
On Twitter:
https://x.com/nesta_red/status/1869487754410967530
Standalone Pset 3.4
Standalone Pset 3.4 Combination of a re1ppp and a re0re0pp pattern sharing a rotatable empty position (re). The player moves on any re0 of the re0re0pp pattern. See this example with screenshot further down:
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PSPPSPSSPSSEPPEPPPESEESSEEEEEEEEEEEEEEEEEEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PPSSEPPEPPPESEESSEEEEEESEEEEEEEEEEEEEEEEEEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PESSPSSEEEPPSSEEESEPSEEEPEPPEEEPEEEEEEEEEEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PESSPSPEEEPSSSEEESEPSEEEPEPPEEEPEEEEEEEEEEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PSPSPSSSPSSPSSSPESSPPSPEPPSSPSEEEPPSSEEEPPP
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PSPSSPSSPSPSSSPPESSPPEPEPPSPESEEEPSESEEEEEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PSPSSPSSPSPSSSPPESSPPPPEPPSPESESEPSESEEESPE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PSSSPSPEPPPSSSEEESEPSEEEPEPPEEEPESEEEEEEEEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:SPSSPSPPSEPSSSPPEPPPSPPEPESSEEESEEPEEESEESE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PPSSPSPPSEPSSSPPEPPPSPEEPESSSEESEEPEEEEEESE
&relationship=All&drsid=0&pisid=0&page=1
On Twitter:
https://x.com/nesta_red/status/1871280172282060831
Standalone Pset 3.5
Standalone Pset 3.5 Combination of two re0re0pp patterns sharing one rotatable empty position (re) on which the player moves. This move creates two re0ppp patterns with two different re0 enabling the player to win. See these examples with screenshots further down:
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PEEPPEEEEEESEEEEEESEEEEEEEEEEEEEEEEEEEEEEEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PEEPEPEEEESESEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PEPPESSPESEEPPSESEEEPPEEEEESEEEEEESEEEEEEEE
&relationship=All&drsid=0&pisid=0&page=1
Persistent Pset 3.6
Persistent Pset 3.6 Combination of a re2ppp and a re1ppp pattern sharing the rotatable empty position (re) on which the player moves. This is a persistent standalone pset because it cannot be deactivated (or defended upon) by the opponent. See these examples with screenshot further down:
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PESPPSPEEPSSPSEESSPPPEEPSSPSEEEPPSEEEESSPEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PSPSEPSSPSSEPPPPPPESEESSEEEEEEEEEEEEEEEEEEE
&relationship=All&drsid=0&pisid=0&page=1
Standalone Pset 3.7
Standalone Pset 3.7 Combination of a non-vertical re0re1pp and a re0re0pp pattern sharing a rotatable empty position with depth 0 (re0) on which the player moves. The re1 and other re0 are on top of eachother. This move creates re1ppp and re0ppp patterns on top of eachother enabling the player to win. See this example with screenshot further down:
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PESPPSPPEPSSPSEESSPPEEEPSSPEEEEPPSEEEESSEEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PEESPSEEEEEPPEEEEEPSEEEEESPEEEEESEEEEEEEEEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PSSPPPSSEESSPEEEEEPPEEEEEPSEEEEESPEEEEEEEEE
&relationship=All&drsid=0&pisid=0&page=1
On Twitter:
https://x.com/nesta_red/status/1855527467953397799
Standalone Pset 3.8
Standalone Pset 3.8 Combination of a vertical re0re1pp and a re0re0pp pattern sharing a rotatable empty position with depth 0 (re0) on which the player moves. This move creates two re0ppp patterns with different re0 enabling the player to win. See this example:
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PEESPSSEEEPPSSEEESEPEEEEPEPEEEEPEEEEEESEEEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PESSPSSEEEPPSSEEESEPSEEEPEPPEEEPEEEEEEEEEEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PESSPSSEEEPPSSEEESEPPEEEPEPSEEEPEEEEEEEEEEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:PPSSPSPESSSPEEEPEPEEEEEEEEEEEEEEEEEEEEEEEEE
&relationship=All&drsid=0&pisid=0&page=1
On Twitter:
https://x.com/nesta_red/status/1872230655767240872
At first I missed case 8. above because I didn't take into account the specific transformations and instances of vertical four in a row patterns as they are different from the horizontal, diagonal up and down patterns. I'll prefix vertical patterns with vt and change re to e since these empty positions are not rotatable inside the pattern. Only a small number of vertical patterns are possible:
- vtpppp
- vte0ppp
- vte1pp
- vte2p
- vte3
Only the following pattern transformations are possible if the player of the pattern moves on the pattern:
- vte0ppp -> vtpppp
- vte1pp -> vte0ppp
- vte2p -> vte1pp
- vte3 -> vte2p
I'll integrate these specific transformations and instances of vertical patterns into the new and existing pattern deductions.
Regarding the player winning in 3 moves the following absolute condition must be anded with all of the above potentially winning pattern combinations. No re0ppp pattern may exist. Otherwise player wins in 1 move, not 3 moves.
Regarding the opponent player winning in 3 moves the following absolute conditions must be anded with all of the above winning pattern combinations together with all the other absolute conditions:
- Regarding a winning move candidate in 3 (see possible combinations above) for player (xExistsMove). On such a move no re1ppp pattern of the opponent may exist. Otherwise after such a move the opponent gets a re0ppp pattern enabling the opponent to win in 1 move and thus not player in 3 moves. See this example with screenshot further down:
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:SSPSSPPPPPSPPSESEPSSSEPESPPEESESSSEEPESPPEE
&relationship=All&drsid=0&pisid=0&page=1
- Regarding a winning move candidate in 3 (see possible combinations above) for player (xExistsMove). On all columns different from such a move no re0ppp pattern of the opponent may exist. Otherwise after such a move the opponent keeps a re0ppp pattern enabling the opponent to win in 1 move and thus not player in 3 moves. See these examples with screenshots further down:
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:SSSPPSPSPPSSPPPSSSPPESPPSSPEPSSPPSESPPSSPEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:SSPSSPPPPPSPPSESPPSSSEPESPPEESESSSEEEESPPEE
&relationship=All&drsid=0&pisid=0&page=1
https://www.tumia.org/en/directory/en/instance.php?tiname=
Connect%20Four:SEPPPSEEEESSPEEEESPPEEEEESEEEEEEPEEEEEESEEE
&relationship=All&drsid=0&pisid=0&page=1
- No pppp pattern of the opponent may exist. Otherwise the opponent has already won en thus not player in 3 moves.
The automated pattern deduction of 4 in 3 moves resulting in the patterns as described above:
https://tumia.org/en/directory/en/instance.php?tiname=
Pattern%20Deduction:%20Connect%204%20in%203%20Moves
&tiname_sel=&relationship=All&drsid=0&pisid=0&tiname_dno=1&page=1
"Pattern Deduction AI in Connect Four in 3 Moves 2024-09-24: An AI trying to do it the Human way - Patterns re0re1pp, re0re0pp, re2ppp, re1ppp, re0ppp and pppp” was written by Paka Small – 2024/09/24.
|
|
|
|