Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 635 Bytes

notes.md

File metadata and controls

54 lines (35 loc) · 635 Bytes

todo:

  • Undo option for human

functions:

  • is_end()

order:

input_check
build board:
	calculate weights
choose player
while not is_game_over():
	player:
		prompt player
			validate choice
				reprompt
	ai:
		best choice (pass board by reference)
			call minimax for each column and save its return value connect to the column
	update board
	print board

utils

is_game_over(): only check in viscinity of newly placed stone 7 stones horizontally 7 stones diagonal1 7 stones diagonal2 4 stones down

get_board_value()

cell: stone: -1 | 0 | 1 weight

board: 2D array of cells

p0:

p1:

p2: