a variant of wff ‘n proof - imperial college londonak6309/equations - a variant of wff 'n...

67
A variant of Wff ‘n Proof Agnieszka Pinchinat-Miernik | Alexander Karapetian | Steven Pool Chengcheng Cui | Jiahui Tan

Upload: phamdang

Post on 22-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

A variant of Wff ‘n Proof

Agnieszka Pinchinat-Miernik | Alexander Karapetian | Steven Pool

Chengcheng Cui | Jiahui Tan

The Team Project Manager - Alexander Karapetian

Front-End Architect – Agnieszka Pinchinat

Front-End Integration Engineer – Steven Pool

Back-End Database Admin – Chengcheng Cui

Back-End Server-Side Engineer – Jiahui Tan

The Project

Multiplayer game

Online / browser based

Based on academic board game Wff ‘n Proof

Wff ‘n Proof pronunciation: /ˈwu̇f ən ˈprüf/

Created by Prof Lehman Allen

MIT, 1961

Wff ‘n Proof pronunciation: /ˈwu̇f ən ˈprüf/

Created by Prof Lehman Allen

MIT, 1961

Dice labelled with ND symbols

Wff ‘n Proof pronunciation: /ˈwu̇f ən ˈprüf/

Created by Prof Lehman Allen

MIT, 1961

Dice labelled with ND symbols

3 mats

Permitted

Required

Forbidden

Target arithmetic proof derived

The Equations Variant

Target arithmetic proof derived

Take turns to move dice to mats

The Equations Variant

Target arithmetic proof derived

Take turns to move dice to mats

Aim to build goal expression

The Equations Variant

Target arithmetic proof derived

Take turns to move dice to mats

Aim to build goal expression

Simpler gameplay

The Equations Variant

Target arithmetic proof derived

Take turns to move dice to mats

Aim to build goal expression

Simpler gameplay

Similar to Countdown’s Numbers round

The Equations Variant

The Equations Variant

Relabelled dice

Digits

Operators

The Equations Variant

Relabelled dice

Digits

Operators

Simplified for children

Build target expressions

Intellectual benefits

The Community

Academic Games Leagues of America (AGLOA)

Frequent tournaments held

Variants aimed at children

Equations

The Equations Project

Research

Existing games online?

The Equations Project

Research

Existing games online?

Revival

Pioneer one of the first online modernisations

Bring to wider audience (casual gamers, parents, …)

The Equations Project

Research

Existing games online?

Revival

Pioneer one of the first online modernisations

Bring to wider audience (casual gamers, parents, …)

Specification

Online multiplayer game

Available Tools Windows

Visual Studio

.NET Framework

2.0, 3.0, 3.5, 4.0

WPF / Silverlight

C#, VB.NET

LINQ

ASP.NET & IIS

Microsoft SQL Server

Linux

Eclipse IDE

Java

Web Applet

Swing

Apache Server

PostgreSQL

Available Tools - Decisions Windows

Visual Studio

.NET Framework

2.0, 3.0, 3.5, 4.0

WPF / Silverlight

C#, VB.NET

LINQ

ASP.NET & IIS

Microsoft SQL Server

Linux

Eclipse IDE

Java

Web Applet

Swing

Apache Server

PostgreSQL

Browser targeting

Firefox

Windows

Mac Linux

Trace Monkey Engine

Internet Explorer

Windows only

ActiveX Hardware Acc. (IE9)

Windows

Google Chrome

Mac Linux

(Chromium)

V8 engine

Game Features Registration

Persistent profiles maintained

Ensuring username uniqueness

Password SHA-1 hashed for database

Security question reset options available

Game Features Registration

Persistent profiles maintained

Ensuring username uniqueness

Password SHA-1 hashed for database

Security question reset options available

Gameplay

Supports 2-8 players per game

Supports many games

Mechanisms included to prevent malicious play

Wave as a malice-prevention tool

Lazy / AFK player disrupts entire game

Employing WAVE

Wave progression:

Discrete time units :: vary based on difficulty

Random dice allocation on progression

Disrupts strategy, incentivises faster play

Wave countdown timer UI element

Strategy / gameplay improvements

Employing WAVE

Mechanics WAVE

Continuous gameplay

Non-repetition

Environment progression

Time consciousness

Non-Malicious

Multiplayer

Equations - DEMO

Structure

Game lobby

Structure

Game lobby

Game tables

Structure

Game lobby

Game tables

Difficulty modes / Varying mats

Beginner (Permitted)

Intermediate (Permitted, Required)

Advanced (Permitted, Required, Forbidden)

Strategy

Challenges

Now – goal has been made

Never – goal cannot be formed

Strategy

Challenges

Now – goal has been made

Never – goal cannot be formed

Scoring

Players side with challenger

Refinements

Graphical

Refinements

Graphical

Spectator mode

Refinements

Graphical

Spectator mode

Multiplayer

Intuitive voting mechanism

Enhancements We care about the experience…

Equations – the UX

Drag and drop dice for ease of use

Enhancements We care about the experience…

Equations – the UX

Drag and drop dice for ease of use

Canvas provided for testing expressions

Enhancements We care about the experience…

Equations – the UX

Drag and drop dice for ease of use

Canvas provided for testing expressions

Game feed displaying chat / important events

Enhancements We care about the experience…

Equations – the UX

Drag and drop dice for ease of use

Canvas provided for testing expressions

Game feed displaying chat / important events

Syntax

Background expression evaluation engine (ANTLR)

Collaboration

High bandwidth meetings

Facebook group

Git

Generalised Pair Programming

Pair Programming

Labs (co-located)

Efficient knowledge transfer

Increased bug capture

Continuous improvement

Management

Challenges

Drag & Drop Region Detection

Region Detection

Difficulty for drag & drop

Solution: split mat area into 5 regions

|----------------------|

| | |

| 1 | 2 |

| | |

|-----------.----------|

| 3 / \ 4 |

| / \ |

| / 5 \ |

|----------------------|

Region Detection int mid_x = x+(WIDTH/2);

int mid_y = y+(HEIGHT/2)-40;

double angle = ((double)150/(HEIGHT-(mid_y-y)));

if(_y <= mid_y && _y >= y){

if(_x<=mid_x && _x >= x){

//Area 1: Permitted

}

else if(_x > mid_x && _x < x+WIDTH){

//Area 2: Required

}

}

else if(_y > mid_y && _y <= y+HEIGHT){

int max = (int) ( angle * (y+HEIGHT-_y) );

if ( _x >= x && _x <= x+WIDTH ) {

if ( _x <= max + x ) {

//Area 3: Permitted

}

else if ( _x > WIDTH-max + x ) {

//Area 4: Required

}

else {

//Area 5: Forbidden

}

}

}

Challenges

Drag & Drop Region Detection

State management

State Management

Adding/extending states

StateManager class

Handles control visibility

The State Interface paint()

Draws entire state

updateState()

Refreshes content

leaveState()

Unbind components

enterState()

Add controls to canvas

WaitingState Example

Challenges

Drag & Drop Region Detection

State management

Graphics

Challenges

Drag & Drop Region Detection

State management

Graphics

Expression validation

Challenges

Drag & Drop Region Detection

State management

Graphics

Expression validation - ANTLR

Equations Grammar

A Number is an integer or decimal value:

Number : ('0'..'9')+

Equations Grammar

A Number is an integer or decimal value:

Number : ('0'..'9')+

An Atomic Expression is a Number and can include brackets:

atomExp returns [int at] :

Number {$at = Integer.parseInt($Number.text); }

| '(' v1 = additionExp { $at = $v1.a; } ')';

Equations Grammar

A Number is an integer or decimal value:

Number : ('0'..'9')+

Whitespace is ignored:

WS : (' ' | '\t' | '\r'| '\n') {$channel=HIDDEN;}

An Atomic Expression is a Number and can include brackets:

atomExp returns [int at] :

Number {$at = Integer.parseInt($Number.text); }

| '(' v1 = additionExp { $at = $v1.a; } ')';

Equations Grammar (cont.)

Addition and Subtraction have the lowest precedence:

additionExp returns [int a] :

v1 = multiplyExp { $a = $v1.d; }

( '+' v2 = multiplyExp { $a = $a + $v2.d; }

| '-' v2 = multiplyExp { $a = $a - $v2.d; } )* ;

Equations Grammar (cont.)

Addition and Subtraction have the lowest precedence:

additionExp returns [int a] :

v1 = multiplyExp { $a = $v1.d; }

( '+' v2 = multiplyExp { $a = $a + $v2.d; }

| '-' v2 = multiplyExp { $a = $a - $v2.d; } )* ;

Multiplication and Division have higher precedence:

multiplyExp returns [int d] :

v1 = powerExp { $d = $v1.p; }

( ('×' | 'x' | '.' | '*' | 'X') v2 = powerExp { $d = $d * $v2.p; }

| '/' v2 = powerExp { $d = (int)Math.round((double)$d/$v2.p); } )*;

Equations Grammar (cont.)

Powering is also supported:

powerExp returns [int p] :

v1 = atomExp { $p = $v1.at; } ( '^‘

v2 = atomExp { $p = (int)Math.pow($p, $v2.at); } )*

| ( '√' v1 = atomExp { $p = (int)Math.round(Math.sqrt($v1.at)); } );

Future Direction Java

Mobile Development / Browser UAS

Future Direction Java

Mobile Development / Browser UAS

HTML5

True cross platform compatibility

Future Direction Java

Mobile Development / Browser UAS

HTML5

True cross platform compatibility

Single player AI

Future Direction Java

Mobile Development / Browser UAS

HTML5

True cross platform compatibility

Single player AI

? – A Variant of Equations

Crossword style point scoring

Encourages use of complex expressions

Adds significance to player scores

Equations II?

Browser based

Concurrent players

WAVE mechanics

Equations

Recap

References Tools

ANTLR Parser Generator – http://www.antlr.org/

Equations Tournament Rules - http://bit.ly/AlFbcF

Wff ‘n Proof References

http://www.wffnproof.com/

http://mlagonline.com/Wff.html

Questions? Alexander Karapetian

[email protected]

Chengcheng Cui

[email protected]

Jiahui Tan

[email protected]

Steven Pool

[email protected]

Agnieszka Pinchinat-Miernik

[email protected]