Skip to content

Instantly share code, notes, and snippets.

View jjstaats's full-sized avatar

Jonathan jjstaats

View GitHub Profile
@jjstaats
jjstaats / Auto Manufacture.cs
Last active June 19, 2022 20:42 — forked from thexa4/ATV Firmware.cs
Space Engineers scripts
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)
{
### 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:
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: