1 of 11

Michigan Data Science Team

Week 2

2 of 11

NNs need numerical input

Mini-AlphaGo

Neural Net

3 of 11

but some numbers are almost useless

Mini-AlphaGo

Neural Net

int(

)

4 of 11

Naive int is bad

board[0, 0] * 380 +

board[0, 1] * 379 +

...

board[8, 7] * 31 +

board[8, 8] * 30

Board.__int__ flattens then converts to base 3

Why is this bad?

int(

) =

5 of 11

Naive int is bad

<

int(

)

int(

)

Rotate -> Better/worse???

Board.__int__ flattens then converts to base 3

Why is this bad?

6 of 11

np.array is better

=

np.array(

)

[[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 1 0 0 0 0]

[0 0 0 2 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 1 2 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]]

Orientation is fixed, using 0=empty, 1=black, 2=white

Something is still wrong…

7 of 11

np.array is better

=

np.array(

)

[[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 1 0 0 0 0]

[0 0 0 2 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 1 2 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]]

Orientation is fixed, using 0=empty, 1=black, 2=white

Something is still wrong…

Empty < Black < White???

8 of 11

Big np.array is even better

=

np.array(

)

[[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 1 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 1 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

“Color” channels like those used for image encoding

But this is still incomplete!

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 1 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 1 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]]

9 of 11

Big np.array is even better

=

np.array(

)

[[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 1 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 1 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

“Color” channels like those used for image encoding

But this is still incomplete!

Past positions+Turn

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 1 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 1 0]

[0 0 0 0 0 0 0 0 0]

[0 0 0 0 0 0 0 0 0]]

10 of 11

Residual Block

Convolutional Block

Some Layer

Another Layer

x

f(x)+x

Conv 2D

Batch Norm 2D

x

f(x)

ReLU

11 of 11

Batch x Channels x 9 x 9

Conv Block

Res Block

Res Block

...

Policy Head

(Fully connected)

Value Head

(Fully connected)

Batch x 9 x 9

Batch x 1

Res Tower

Add more “useful” channels (feature planes)

Thinks about Go

Convert to interpretable outputs