PascalPons / connect4

Connect 4 Solver
GNU Affero General Public License v3.0
273 stars 50 forks source link

explain how to use the cli with a compiled version #3

Closed MeMeMax closed 6 years ago

MeMeMax commented 6 years ago

Hi, could you explain what I have to enter in the command prompt? I always get "Invalid move".

Would it be possible to expand the online api to have another parameter "width" and height in order to have a game with 9 rows?

PascalPons commented 6 years ago

The input in one position per input line.

The encoding of a position is just the sequence of played column number (1-based). An invalid position is either an invalid column number, invalid character, playing on a column that is already full or continuing to play after some already won. You can find more details in the second paragraph of this blog post: http://blog.gamesolver.org/solving-connect-four/02-test-protocol/

unfortunately, it is not possible to update easily the online solver to support custom board size. The solver only has precomputed opening data for the standard 7x6 board. Precomputing data for too large boards may also be untractable.

MeMeMax commented 6 years ago

Ok Thanks for the explanation. Is there any way to get this precomputed data into the c++ version? It takes quite a while to calculate.

PascalPons commented 6 years ago

by definition, you need to compute the pre-computed data at least once. It will take quite a while (up to the eternity from a human life point of view) on too large boards.

2017-12-06 11:32 GMT-08:00 MeMeMax notifications@github.com:

Ok Thanks for the explanation. Is there any way to get this precomputed data into the c++ version? It takes quite a while to calculate.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PascalPons/connect4/issues/3#issuecomment-349749652, or mute the thread https://github.com/notifications/unsubscribe-auth/AF_Lg_Wk0iLJ3nVRxV0ui8MsDt3iKjhOks5s9uvpgaJpZM4Q3BAK .

MeMeMax commented 6 years ago

Yes but 9x6 would manageable I think. How can I pre-compute the data myself and make the program use this pre computed data?

kirarpit commented 6 years ago

@MeMeMax, were you able to precompute the data somehow?

MeMeMax commented 6 years ago

No, I wasn´t.