a tie is not a loss

24
A TIE IS NOT A LOSS Paul Adamiak T02 Aruna Meiyeppen T01

Upload: nassor

Post on 07-Jan-2016

44 views

Category:

Documents


1 download

DESCRIPTION

A TIE IS NOT A LOSS. Paul Adamiak T02 Aruna Meiyeppen T01. Strategy. Check to see if we can win Check to see if opponent can win Check if we can make 4 in a row Check if opponent can make 4 in a row Make next best move. root. Possible moves. …. o. o. o. x. Chosen threat. o. o. o. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A TIE IS NOT A LOSS

A TIE IS NOT A LOSS

Paul Adamiak T02

Aruna Meiyeppen T01

Page 2: A TIE IS NOT A LOSS

Strategy

• Check to see if we can win• Check to see if opponent can win• Check if we can make 4 in a row• Check if opponent can make 4 in a row• Make next best move

root

…Possible moves

Page 3: A TIE IS NOT A LOSS

Strategy Success

• The strategy didn’t work as well as hoped– Able to always beat a human user, rarely another

program• Defensive move is determined by a linear search of the

board.– Handles a random threat which may not be the most

threatening

Chosen threat

Most threatening

Page 4: A TIE IS NOT A LOSS

Favourite Move

• Filling space in between two threats

Fill space

Page 5: A TIE IS NOT A LOSS

CPSC 335Assignment 5

Leina Leung TUT 01 (Russel Apu)

& Katy Lin TUT 02 (Jagoda Walny)

Page 6: A TIE IS NOT A LOSS

Explain what strategy you used and why.• Alpha-Beta Pruning

• Why we use Alpha beta pruning? To eliminate non-interested branches of the search tree.

• Move-Ordering

for every empty square: If next move is a win or blocks opponent from

winning then add it to the list Else if the empty square is between 3 squares or

adjacent to 3 connected squares of the same type then add it to the list

Else if this empty square makes the largest connected adjacent square of the same type then add it to the list

• Transposition Table: We used a transposition table to reduce calculation time. Since at any state of the board there are many different move orderings to get to that state we reduce our calculation of those same state by keeping the utility of that state.

Page 7: A TIE IS NOT A LOSS

Describe how well your strategy worked

(use your overall ranking/score to support your claims), and explain why you think it

performed the way it did.

• The strategy that we decided to use performed well on our part. We rank 3rd in the competition.

• Mostly the move ordering is how we win and we only search 7 plies.

• Limitations: Due to the 3 seconds time limit and the inefficiency of our move ordering we were only able to search 7 plies deep. This only allowed us to look 4 moves in advanced and thus does not always makes the best move.

Page 8: A TIE IS NOT A LOSS

Describe how well your strategy worked

(use your overall ranking/score to support your claims), and explain why you think it

performed the way it did.

Page 9: A TIE IS NOT A LOSS

Our Best Move.Animation - FORK

Page 10: A TIE IS NOT A LOSS

THE ENDThank you.

Page 11: A TIE IS NOT A LOSS

Group member

Shan Chen

Tutorial number: T01

Page 12: A TIE IS NOT A LOSS

Game Strategy

• Search algorithm: Alpha-beta pruning

Page 13: A TIE IS NOT A LOSS

How my strategy worked

• Since minimax search is depth-first, so I sort the possible moves by the value of evaluation function, so that nodes of possibly better outcome will be checked before timeout.

• My evaluation function did not work very well at the beginning, it made lots of mistakes at the first two days.

Me vs. Team 4 : 12 : 200

Me vs. Team 10 : 62 : 90

Page 14: A TIE IS NOT A LOSS

Best move

Page 15: A TIE IS NOT A LOSS

CPSC 335 – Assignment 5Tut 01

David Clarke

Brady Lill

Page 16: A TIE IS NOT A LOSS

Algorithm used:

Our algorithm that we decided to implement is a “Greedy” algorithm, because it was the simplest and most straight forward algorithm to implement. Our basic goal, in our algorithm was to produce a chain of 5 before the opponent does, and only block when the opponent has a chance to win. (ie: has already got a string >= 3)

Page 17: A TIE IS NOT A LOSS

We Lose More Than We Win

One of the major problems with our algorithm, is that our blocking strategy is only invoked if we believe that we have no chance of winning. If we believe that we can win, we will not block. In effect, we are always being greedy and going for the win.

One improvement that we could do to make our blocking strategy more effective, is to build a move tree, that will consist of all possible block moves, that will in tern produce a more effective blocking strategy.

Page 18: A TIE IS NOT A LOSS

Best Move:

Our best move is the Opponent Block, where we attempt to block an opponent who is in a position to win (ie: has already got a chain of >= 3) by placing a block on either side of the chain. Problem, is that it only is able to place a block once.

– ………………………………………………

– ……….xxxo………………………………..– ………………………….ooo……….……...– ………………………………………………

BLOCK

Page 19: A TIE IS NOT A LOSS

C-BlockingVendetta, Defined

Patrick Bick, Sarabjot Samra

CPSC335 – Data Structures II

Winter 2008

Page 20: A TIE IS NOT A LOSS

The Basics: Not about victory; assure opponent cannot win.

Victory is incidental and essentially random

Page 21: A TIE IS NOT A LOSS

How it Works: Play for the bad side, but use the wrong symbol

Plot most advantageous moves for opponent in the area, then steal them!

Page 22: A TIE IS NOT A LOSS

Why it Works: Every move opponent makes is taken as aggressive

The “path to victory” is littered with our “wrong” moves

Page 23: A TIE IS NOT A LOSS

Funny Things: Works equally good (bad?) against random / greedy

Not overly difficult to compute

“Greedy” for the wrong reasons

Should have done a min-max

Page 24: A TIE IS NOT A LOSS

?Questions: