Computer Player for Twixt TWIXT PP

10 replies. Last post: 2005-07-20

Reply to this topic Return to forum

Computer Player for Twixt
  • ab at 2005-06-01

    I have finally written down some thoughts at

    http://senseis.xmp.net/?Twixt

  • ab at 2005-06-01

    maybe somebody can add the 4x4 … etc results…

    (no time at the moment)

  • David J Bush ★ at 2005-06-02

    I appreciate your work! Regarding openings on the small boards, did you use the included Go board image generator? That doesn't really work for Twixt, does it? A list of moves might be possible, but diagrams would be more effective. I notice you were able to show an image from the BoardGameGeek site. Unfortunately, I have no website of my own for referencing images. Any discussion of opening theory, even on those small grids, would require quite a few images. BoardGameGeek would NOT be the place to store such images. Their Twixt image gallery is supposed to be for photos of actual sets, not a slew of position diagrams. See my comments in the “discussion” section.

  • technolion at 2005-06-02

    I also spent some thinking time about a Twixt AI. I came to the conclusion that a generic approach like in Chess cannot be used.

    A Chess computer actually “tries out” all possible moves and rates each move in regard to to change in advantage for both players. After a predefined depth (number of moves to think ahead) the computer chooses the path that gives it the best improvement.

    In Twixt this strategy cannot be used because it is hardly impossible to rate the board setup after a single move without having a lot of knowledge about the tactics of the game. This holds true especially in the opening of a game.

    I am trying to build a Twixt AI by writing a small opening book (about 3 - 4 moves). After the opening the Computer needs to choose its next move after processing a range of rules. These rules will constist of the knowledge I (as a Twixt player) have about the game.

    Every experienced player played somewhat 'automatic' because he (female Twixt players please speak up!) makes use of learned concepts, for instance which block makes sense in which situation.

    If the rule set is large enough, the AI will come close to the skill of the composer of the ruleset. Of course which this approach you cannot write an AI that plays better than human beings, but I believe LG skill level of about 1600 could be achieved.

    What do you think?

    PS: David, I can provide you with web space for the images. Do you still have my email address?

  • ab at 2005-06-04

    with rules, you probably mean some “standard” moves, like:

    \\ extensions/jumps: 2-1,1-2;3-3,4-0, etc

    \\ blocks: 2-0,4-0, etc

    apart from this, your rules will get difficult to implement

  • ab at 2005-06-04

    -- any (concrete) idea for other “rules”??

    2. Does somebody have a formula for the distance of a point to an “area line” (answer as int)?

  • Alan Hensel at 2005-06-04

    What's an “area line”?

  • ab at 2005-06-04

    diagonal guide lines, or how you like to call them

    i wanted a function that calculates the distance as an integer value, 0, if the point is on this line (but it is not so important)

  • ab at 2005-07-19

    i have a own version of Johannes Schwagereit's T1 for download:

    http://www.8ung.at/hgui/T2_RELEASE3.zip

    (you can load and save (and view) the little-golem-sgf-files)

    (other changes are internal, some unfinished)

  • ab at 2005-07-20

    ok, some additional comments:

    I've downloaded from the address you specified and I

    cannot compile the project: “cannot open FL/Fl.h” …

    to compile you need fltk from fltk.org (for windows/linux/cygwin, all the same download)

    RELEASE3.notes describes the features/changes to T1

    read HOWTO-build.txt or INSTALL for some tips how to build

    (.exe for cygwin is also included)

    \\\**********************

    I am really interested in helping any effort in

    a computer twixt player.

    T2 doesn't really play (it makes very simple moves), currently, but it is

    planned. if you want to help, i recommend that you try a very simple

    computer opponent first on your own (it's very difficult to coordinate

    writing code for this). you can use the T2-code as a framework (see

    ai_main, replace the code in this function). i use 2 mirrored boards

    (so that the player-to-move always plays in the x-direction) and an

    incremental updating of sets of already connected pegs (=groups).

    let me know if anybody begins writing some lines of code (i'll send you newer versions of T2 then)

    \\\**********************

    changes to T1:

    i have taken the code from the previous version of T1 for basic board managemnet

    and gui (which i have both adapted for my needs), however the computer player

    i have begun completely new.

    \\\**********************

    T2 (based on T1, developed indepentently for some time; T1 plays better

    (was even improved since the branch); in fact T2 (almost) doesn't play,

    but has some other changes) (includes the cpp-Source for Windows, Linux, cygwin; includes EXE compiled with cygwin)

    \\\**********************

    i call my version of T1 T2 just to distinguish it from Johann Schwagereit's version (which he has improved also).

Return to forum

Reply to this topic