This file contains hidden or 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
#!/usr/bin/env python | |
""" | |
A small class for Principal Component Analysis | |
@From: http://stackoverflow.com/questions/1730600/principal-component-analysis-in-python | |
@author Denis http://stackoverflow.com/users/86643/denis | |
@dated: April 2010 | |
Usage: | |
p = PCA( A, fraction=0.90 ) |
This file contains hidden or 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
## | |
# This function calculates my bot's move in connect four algorithm | |
# returned mymove indicates what column to play on | |
# passed variable opponentmove should be the column the opponent just play on | |
# | |
# www.code-wars.com | |
def calculate_my_move (opponentmove): | |
if opponentmove = anything_at_all: |
NewerOlder