This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package player; | |
public abstract class Board { | |
/** | |
* @param args | |
*/ | |
public boolean isValidMove(Move m){ | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package player; | |
public class MyBoard extends Board { | |
private Piece[][] pieces = new Piece[8][8]; | |
public Piece[][] getArray(){ | |
return pieces; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#problem e | |
#Sk is total number of heads in trial of k total coin cosses | |
def deviation(k, p, e): | |
deviate = abs(numHeads(k,p) - k*p) | |
return deviate >= e*k | |
def probOfDeviation(numOfTrials, numOfTosses, prob, error): | |
actual = (prob*(1-prob)/(numOfTosses*error**2)) | |
calculated = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private boolean networkParser(int playerColor) { | |
//find piece on left side and right side | |
boolean hasLeft,hasRight,hasTop,hasBottom; | |
Piece[] networkTop, networkBottom, networkLeft, networkRight; | |
if (playerColor == 0){ | |
hasTop = false; | |
hasBottom = false; | |
networkTop = new Piece[8]; | |
networkBottom = new Piece[8]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package player; | |
public abstract class MyBoard { | |
/** | |
* @param args | |
*/ | |
private Piece[][] pieces = new Piece[8][8]; | |
public boolean isValidMove(Move m){ | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean networkParser(int playerColor) { | |
boolean hasLeft,hasRight,hasTop,hasBottom; | |
Piece[] networkTop, networkBottom, networkLeft, networkRight; | |
if (playerColor == 0){ | |
hasTop = false; | |
hasBottom = false; | |
networkTop = new Piece[8]; | |
networkBottom = new Piece[8]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Receiver: | |
def __init__(self, num_chunks, channel): | |
self.num_chunks = num_chunks | |
self.received_packets = [] | |
self.chunks = [ ] | |
for i in range(self.num_chunks): | |
self.chunks.append( np.zeros(Packet.size_of_packet, 'uint8') ) | |
self.found = [ False for x in range(self.num_chunks) ] | |
self.channel = channel | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[0.0, 0.0, 0.03, 0.0], | |
[0.01, 0.0, 0.06, -0.02], | |
[0.03, -0.0, 0.09, -0.05], | |
[0.05, -0.0, 0.12, -0.1], | |
[0.09, -0.01, 0.15, -0.17], | |
[0.13, -0.01, 0.18, -0.26], | |
[0.19, -0.03, 0.21, -0.36], | |
[0.25, -0.05, 0.24, -0.48], | |
[0.31, -0.08, 0.27, -0.62], | |
[0.37, -0.13, 0.3, -0.78], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[0.0, 0.0, 0.03, 0.0], | |
[0.05, -0.0, 0.12, -0.1], | |
[0.19, -0.03, 0.21, -0.36], | |
[0.36, -0.11, 0.18, -0.48], | |
[0.48, -0.18, 0.09, -0.48], | |
[0.53, -0.2, 0.0, -0.48], | |
[0.51, -0.19, -0.09, -0.48], | |
[0.41, -0.14, -0.18, -0.48], | |
[0.25, -0.05, -0.27, -0.48], | |
[0.01, 0.07, -0.3, -0.48], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[0.0, 0.0, 0.03, 0.0], | |
[0.05, -0.0, 0.12, -0.1], | |
[0.17, -0.02, 0.09, -0.33], | |
[0.22, -0.04, 0.0, -0.43], | |
[0.19, -0.03, -0.09, -0.38], | |
[0.09, 0.0, -0.18, -0.17], | |
[-0.1, 0.01, -0.27, 0.19], | |
[-0.34, -0.08, -0.3, 0.35], | |
[-0.6, -0.12, -0.3, -0.17], | |
[-0.85, -0.03, -0.3, -0.69], |
OlderNewer