CSE190L Notes for Wednesday, 5/9/07

We continued our discussion of Qubic strategy. I had discussed the four really important cases to look for: computer3, player3, 2nd computer2 (computer double), and 2nd player2 (player double). I also mentioned that a mixed row is probably worth nothing. Beyond this, there is a lot more choice about how you can value different possibilities.

An open row should be worth a decent amount of points because every open row you pick will claim territory for your player. We had discussed the fact on Monday that 16 of the squares are more valuable than the others. I asked people whether we need special code to choose those over the others. The answer is no. For example, if an open row is worth 100 points, then the 16 squares that are each part of seven four-in-a-rows will be valued at 700 points. The other 48 squares will only be valued at 400 points because they're only part of 4 four-in-a-rows.

I also briefly described a strategy that Keith Lynch referred to as "the vice". We had seen that having 3 corners of a plane can be very useful. Consider this placement of 4 pieces:

        - - - -    - - - -    - - - -    - - - X

        - - - -    - - - -    - - - -    - - - -

        - - - -    - - - -    - - - -    - - - -

        X - - X    - - - -    - - - -    - - - X
With these four pieces, you have four different planes on which you have three corners. Just ignore any one of these four pieces and you'll find that the three that are left are all part of a single plane.

Then I spent some time describing the recursive lookahead strategy. It won't be helpful early in the game because it relies on finding computer2 rows to work with. So the recursive lookahead strategy wouldn't kick in until each player has more like 3 or 4 pieces on the board. The strategy is described in pseudocode in the Qubic writeup, so I won't try to repeat our discussion here in the notes.

We spent the last part of lecture looking at some Java demos. You'll find that when you install Java on a Windows machine, these files are automatically stored on your computer. Look inside the "Program Files" directory to find the "java" folder. Look inside that for a "jdk" folder. Look inside that for a folder called "demo". Inside that you'll find a folder called "jfc" that has the demos I talked about. For example, on my Windows machine the folder is stored at:

        C:\Program Files\Java\jdk1.6.0_01\demo\jfc
The term "jfc" is short for "Java Foundation Classes," which is a marketing term Sun was using for a while to describe the Java class libraries. For Mac users, if you have installed the Apple Developer Tools, you should find this folder under /Developer/Examples/Java. The demos that were particularly interesting are Java2D, NotePad and SwingSet2.


Stuart Reges
Last modified: Tue May 15 18:54:36 PDT 2007