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 ItemTarget { | |
public ItemTarget(string category, string subtype, string blueprintCategory, string blueprintSubtype, long destCount) | |
{ | |
Type = new MyItemType(category, subtype); | |
Blueprint = MyDefinitionId.Parse(blueprintCategory + "/" + blueprintSubtype); | |
DestCount = destCount; | |
} | |
public ItemTarget(MyItemType type, long destCount) | |
{ |
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
### Keybase proof | |
I hereby claim: | |
* I am jjstaats on github. | |
* I am jjstaats (https://keybase.io/jjstaats) on keybase. | |
* I have a public key whose fingerprint is DBEF 7185 C8DD 6F70 8EE9 E6CF D86B C176 75FD BACF | |
To claim this, I am signing this object: |
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
import random | |
########################## SOLVER ########################## | |
def findBestMove(node, color, getChildren, getValue, maxDepth = 8, maxValue = 1000): | |
def negamax(node, depth, alpha, beta, color): | |
children = getChildren(node, color) | |
if len(children) == 0 or depth == 0: # no moves left or too deep | |
return getValue(node) * color | |
else: |