Michael Birken's proposed solution to Ultimate Tic-Tac-Toe: Searching the entire game tree has shown that X can force a win regardless of the moves of O; however, in the come-back variant, X cannot always force a win. When X plays optimally in the original version of Ultimate Tic-Tac-Toe, X will make somewhere between 3 and 8 moves until O is forced (or accidentally) to get a threesome and lose, or X obtains a threesome on his 8th turn and wins. The following simple heuristic matches the optimal moves for X's first and second turns: for column = 1 to 4 do for row = 1 to 4 do if position at (row, column) is empty and putting X at (row, column) doesn't create a threesome then X moves to (row, column) For the 8th turn, X simply moves to the position that creates a threesome. For the remaining turns, X can play optimally using the above heuristic along with a set of correction tables. Here are the tables: Turn #3: [24]->(2,3), [4104, 32776]->(2,4) Turn #4: [152, 32792]->(3,1), [4106, 6152, 20488, 32778, 34824, 49160]->(2,3), [28, 1048, 2072, 4108, 4120, 4168, 4360, 4616, 8216, 12296, 16408, 32780, 32840, 33032, 33288, 40968]->(2,4), [280]->(4,4), [36872] ->(3,2), [32904]->(4,1), [4232]->(4,2) Turn #5: [184, 32906, 32908, 32920, 32968, 33160, 33416, 34826, 34828, 34888, 35080, 35336, 35848, 41096, 43016, 49288, 49672, 51208]->(4,1), [8296, 12448, 32936, 37024, 41120, 43016, 49288]->(3,3), [284, 312, 792, 2328, 6216, 8360, 8472, 12424, 14344, 16664, 20616, 21000, 22536]->(4,4), [37000]->(4,3), [14344, 43016]->(3,1), [1304, 4234, 4236, 4248, 4296, 4488, 4744, 6154, 6156, 6168, 6216, 6408, 6664, 7176, 32936]->(4,2), [4200, 32872, 32906, 36876, 36882, 36888, 36936, 37128, 37384, 37896, 45064]->(3,4), [4264, 14344, 38920, 53256]->(3,2), [6162, 8472, 16664, 32796, 33816, 34834, 34840, 36888, 40984, 45088, 49176]-> (2,4), [6156, 6408, 7176, 22536, 34828, 34840, 35080, 35848, 36876, 36888, 36904, 37128, 37896, 38920, 45064, 51208]->(2,3) Turn #6: [36940, 36968, 37900, 37960, 39944, 45068, 45128, 46088, 47112]->(3,1), [8476, 8600, 9496, 10520, 34072, 36946, 37002, 37004, 37016, 37064, 37256, 37416, 37512, 38024, 38922, 38924, 38930, 38936, 38984, 39176, 39432, 39944]->(4,3), [4298, 4490, 4776, 5258, 6248, 8362, 8364, 8376, 8616, 8624, 12426, 12428, 12440, 12452, 12456, 12464, 12488, 12680, 12704, 12824, 12936, 14346, 14348, 14354, 14360, 14408, 14600, 14856, 15368, 17688, 20562, 20618, 20620, 20632, 20680, 20872, 21004, 21032, 21128, 21256, 21640, 22024, 22538, 22540, 22546, 22552, 22600, 22792, 23048, 23560]->(4,4), [47112]->(3,2), [2108, 12392, 24856, 37032, 41064, 43020, 43272, 45096, 45320, 47112]->(3,3), [12392, 12452, 12704, 20584, 32876, 32940, 33128, 33192, 37028, 37130, 37280, 37898, 41002, 41064, 41124, 41128, 41226, 41376, 41994, 45066, 45216, 49256, 53258, 53320]->(3,4), [1084, 3100, 3128, 9320, 10282, 32938, 32970, 33162, 33308, 33324, 33336, 33448, 33576, 33930, 34858, 34920, 35082, 35340, 35352, 35368, 35592, 35850, 35852, 36104, 41098, 41124, 41136, 41376, 41496, 43018, 43528, 44040, 49234, 49290, 49676, 49704, 49928, 51210, 51218, 51720]->(4,1), [4156, 4204, 4456, 4636, 4652, 4664, 4904, 5148, 5176, 5224, 6172, 6200, 6410, 6668, 6680, 6696, 6920, 7178, 7192, 16668, 16792, 17688, 18712, 32938, 32940, 32952, 33192, 33200, 36908, 36968, 37002, 37028, 37032, 37040, 37160, 37192, 37280, 37400, 38152, 38922, 39944]->(4,2) Turn #7: [5180, 6204, 7196, 7224]->(4,3) The elements of each table are of the form [list of numbers]->(row, column). To use them, concatenate together each row of the board state into 1 long row. Reverse this string. Then replace all O’s with ones and replace all X’s and empty positions with zeros. Treat this string as a binary number and convert it to decimal. If that number if found in any of the lists for that turn, then X moves to the position associated with that list. Otherwise, use the heuristic presented above. For example, for this board state: XX.O O... .... .... I concatenate together the rows: XX.OO........... And, reverse it: ...........OO.XX And, turn it into binary: 0000000000011000 And, this turns out to be the number 24 in decimal. Since I am trying to compute the optimal third move of X, I look at the table for turn #3 and find that for 24, X should move to (2,3). If my number was not in the set, { 24, 4104, 32776 }, then I would have followed the heuristic above and moved to (2,2).