<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.lensovet.net/~sysadmin/w/index.php?action=history&amp;feed=atom&amp;title=Computer_Science%2F61b%2FProjects%2FNetwork%2Fplayer%2FMachinePlayer.java</id>
	<title>Computer Science/61b/Projects/Network/player/MachinePlayer.java - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.lensovet.net/~sysadmin/w/index.php?action=history&amp;feed=atom&amp;title=Computer_Science%2F61b%2FProjects%2FNetwork%2Fplayer%2FMachinePlayer.java"/>
	<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Projects/Network/player/MachinePlayer.java&amp;action=history"/>
	<updated>2026-05-03T12:39:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Projects/Network/player/MachinePlayer.java&amp;diff=24411&amp;oldid=prev</id>
		<title>Lensovet: Lensovet moved page CS/61b/Projects/Network/player/MachinePlayer.java to Computer Science/61b/Projects/Network/player/MachinePlayer.java</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Projects/Network/player/MachinePlayer.java&amp;diff=24411&amp;oldid=prev"/>
		<updated>2023-02-20T03:51:36Z</updated>

		<summary type="html">&lt;p&gt;Lensovet moved page &lt;a href=&quot;/~sysadmin/w/CS/61b/Projects/Network/player/MachinePlayer.java&quot; class=&quot;mw-redirect&quot; title=&quot;CS/61b/Projects/Network/player/MachinePlayer.java&quot;&gt;CS/61b/Projects/Network/player/MachinePlayer.java&lt;/a&gt; to &lt;a href=&quot;/~sysadmin/w/Computer_Science/61b/Projects/Network/player/MachinePlayer.java&quot; title=&quot;Computer Science/61b/Projects/Network/player/MachinePlayer.java&quot;&gt;Computer Science/61b/Projects/Network/player/MachinePlayer.java&lt;/a&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 03:51, 20 February 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Lensovet</name></author>
		
	</entry>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Projects/Network/player/MachinePlayer.java&amp;diff=3949&amp;oldid=prev</id>
		<title>Lensovet: moved CS 61b/Projects/Network/player/MachinePlayer.java to CS/61b/Projects/Network/player/MachinePlayer.java:&amp;#32;fix CS 61b hierarchy</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Projects/Network/player/MachinePlayer.java&amp;diff=3949&amp;oldid=prev"/>
		<updated>2010-11-14T05:59:46Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/~sysadmin/w/CS_61b/Projects/Network/player/MachinePlayer.java&quot; class=&quot;mw-redirect&quot; title=&quot;CS 61b/Projects/Network/player/MachinePlayer.java&quot;&gt;CS 61b/Projects/Network/player/MachinePlayer.java&lt;/a&gt; to &lt;a href=&quot;/~sysadmin/w/CS/61b/Projects/Network/player/MachinePlayer.java&quot; class=&quot;mw-redirect&quot; title=&quot;CS/61b/Projects/Network/player/MachinePlayer.java&quot;&gt;CS/61b/Projects/Network/player/MachinePlayer.java&lt;/a&gt;: fix CS 61b hierarchy&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 05:59, 14 November 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Lensovet</name></author>
		
	</entry>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Projects/Network/player/MachinePlayer.java&amp;diff=3271&amp;oldid=prev</id>
		<title>Lensovet at 07:32, 22 September 2007</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Projects/Network/player/MachinePlayer.java&amp;diff=3271&amp;oldid=prev"/>
		<updated>2007-09-22T07:32:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{code}}&lt;br /&gt;
 /* MachinePlayer.java */&lt;br /&gt;
 &lt;br /&gt;
 package player;&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
  *  An implementation of an automatic Network player.  Keeps track of moves&lt;br /&gt;
  *  made by both players.  Can select a move for itself.&lt;br /&gt;
  */&lt;br /&gt;
 public class MachinePlayer extends Player {&lt;br /&gt;
 	&lt;br /&gt;
 	private int color;&lt;br /&gt;
 	private int opponent;&lt;br /&gt;
 	private int depth;&lt;br /&gt;
 	private Gameboard board;&lt;br /&gt;
 	&lt;br /&gt;
 	public static final int SDEPTH = 2;&lt;br /&gt;
 	&lt;br /&gt;
 	// Creates a machine player with the given color.  Color is either 0 (black)&lt;br /&gt;
 	// or 1 (white).  (White has the first move.)&lt;br /&gt;
 	public MachinePlayer(int color) {&lt;br /&gt;
 		this(color, SDEPTH);&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	// Creates a machine player with the given color and search depth.  Color is&lt;br /&gt;
 	// either 0 (black) or 1 (white).  (White has the first move.)&lt;br /&gt;
 	public MachinePlayer(int color, int searchDepth) {&lt;br /&gt;
 		this.color = color;&lt;br /&gt;
 		opponent = Gameboard.generateOpponent(color);&lt;br /&gt;
 		depth = searchDepth;&lt;br /&gt;
 		board = new Gameboard();&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	// Returns a new move by &amp;quot;this&amp;quot; player.  Internally records the move (updates&lt;br /&gt;
 	// the internal game board) as a move by &amp;quot;this&amp;quot; player.&lt;br /&gt;
 	public Move chooseMove() {&lt;br /&gt;
 		Move winningmove = board.evalTree(color, depth);&lt;br /&gt;
 		board.performMove(color, winningmove);&lt;br /&gt;
 		return winningmove;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	// If the Move m is legal, records the move as a move by the opponent&lt;br /&gt;
 	// (updates the internal game board) and returns true.  If the move is&lt;br /&gt;
 	// illegal, returns false without modifying the internal state of &amp;quot;this&amp;quot;&lt;br /&gt;
 	// player.  This method allows your opponents to inform you of their moves.&lt;br /&gt;
 	public boolean opponentMove(Move m) {&lt;br /&gt;
 		return board.performMove(opponent, m);&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	// If the Move m is legal, records the move as a move by &amp;quot;this&amp;quot; player&lt;br /&gt;
 	// (updates the internal game board) and returns true.  If the move is&lt;br /&gt;
 	// illegal, returns false without modifying the internal state of &amp;quot;this&amp;quot;&lt;br /&gt;
 	// player.  This method is used to help set up &amp;quot;Network problems&amp;quot; for your&lt;br /&gt;
 	// player to solve.&lt;br /&gt;
 	public boolean forceMove(Move m) {&lt;br /&gt;
 		return board.performMove(color, m);&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	public int boardScore() {&lt;br /&gt;
 		return board.winner();&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Lensovet</name></author>
		
	</entry>
</feed>