OTHEXO An enhanced hexareversi game Features & Improvement - - PowerPoint PPT Presentation

othexo
SMART_READER_LITE
LIVE PREVIEW

OTHEXO An enhanced hexareversi game Features & Improvement - - PowerPoint PPT Presentation

OTHEXO An enhanced hexareversi game Features & Improvement Improved Graphics & Animation Redesigned Webpage Tournament Mode AI THEXI Original Hexareveri Graphics & Animation SVG drawn hexagon grid SVG


slide-1
SLIDE 1

An enhanced hexareversi game

OTHEXO

slide-2
SLIDE 2
  • Improved Graphics & Animation
  • Redesigned Webpage
  • Tournament Mode
  • AI – THEXI

Features & Improvement

slide-3
SLIDE 3

Original Hexareveri

slide-4
SLIDE 4

Graphics & Animation

  • SVG drawn hexagon grid

– SVG HTML5 design, lossless vector drawing – Size relative to client width & height – Each hexagon is an separate polygon, handled separately, stored in hexagonarr[] – The grid is only drawn once, colours updated using reDraw() – Drawn using svg.js library

slide-5
SLIDE 5
  • Interactive hexagon grid

– .mouseover() animations

– Highlights hexagon cells with current player’s colour

– .click() events handled,

– Cell clicked passed into “hidden + side” input as to preserve initial design – Checks that players are human and that it is their turn

– Converted hexagon cell animation

– Cell rotate and switch colours when they are changed

Graphics & Animation

slide-6
SLIDE 6
  • Simple and intuitive user interface

– Fluid and relative design, fits in one page, – Irrelevant options and grid hidden

  • Compatible with modern PC and mobile browsers

– Tested with Chrome, Safari, Firefox, IE 10, Android, IOS

Redesigned Webpage

slide-7
SLIDE 7

Redesigned Webpage

slide-8
SLIDE 8
  • Simulate AI vs AI

– On the fly updating of results – Restarts by recycling Game instance

– Avoids drawing hexagon grid, update colours with reDraw()

– Implemented inside of Game class, handled internally

– Preserves initial setTimeout() design

Tournament Mode

slide-9
SLIDE 9
  • Functions:

– predictMove(simboard, predarray, count, initcell, initscore, userorenemy)

– Check for valid moves in simboard, recurses itself to predict enemy moves

– Recursion depth (count) can be adjusted for THEXI’s difficulty – Set at 2, balance between performance & difficulty

– moveOnce(board, cellnum, userorenemy)

– Stimulates piece put down at cellnum in board – Converts affect cells in board

AI - THEXI

slide-10
SLIDE 10
  • Functions:

– countPieces(board)

– Calculates net score from board (player – opponent pieces)

  • Variables

– simboard

– Registers player piece as 1, opponent as -1 – Ensures player can be red or blue

– predarray

– Stores the evaluated value of each hexagon cell – THEXI will pick the highest value cell

AI - THEXI

slide-11
SLIDE 11

Outline of THEXI

countPieces() counts score, passes it to predictMove() predictMove() passes each empty cell to moveOnce() moveOnce() returns if it’s a valid move, if so predictMove() recurses and switches side predictMove() compares simulated score with intial score and modifies the value in predarray[init cell] Cell with highest value in predarray[] is returned

slide-12
SLIDE 12
  • Additional conditions THEXI considers:

– More value is added to cells where opponents are forced to passed, and score is advantages to us. – predarray[] values are modified according to their positions too

AI - THEXI

  • Highest Priority
  • High Priority
  • Lowest Priority
  • Low Priority
slide-13
SLIDE 13
  • http://goo.gl/rV3hqJ
  • Username: gem1501
  • Password: y1314s2

OTHEXO