axle
.
game
.
ttt
TicTacToe
case class
TicTacToe
(
boardSize:
Int
=
3
,
xClass:
String
=
"human"
,
oClass:
String
=
"ai"
)
extends
Game
[
TicTacToe
] with
Product
with
Serializable
TicTacToe is a 2-player perfect information zero-sum game
Linear Supertypes
Serializable
,
Serializable
,
Product
,
Equals
,
Game
[
TicTacToe
],
AnyRef
,
Any
Ordering
Alphabetic
By inheritance
Inherited
TicTacToe
Serializable
Serializable
Product
Equals
Game
AnyRef
Any
Hide All
Show all
Learn more about member selection
Visibility
Public
All
Instance Constructors
new
TicTacToe
(
boardSize:
Int
=
3
,
xClass:
String
=
"human"
,
oClass:
String
=
"ai"
)
Type Members
case class
AlphaBetaFold
extends
Product
with
Serializable
Definition Classes
Game
abstract
type
EVENT
<:
Event
[
TicTacToe
]
Definition Classes
Game
type
MOVE
=
TicTacToeMove
Definition Classes
TicTacToe
→ Game
type
Matrix
[
T
]
= (
tttmm
)#
Matrix
[
T
]
type
OUTCOME
=
TicTacToeOutcome
Definition Classes
TicTacToe
→ Game
type
PLAYER
=
TicTacToePlayer
Definition Classes
TicTacToe
→ Game
type
STATE
=
TicTacToeState
Definition Classes
TicTacToe
→ Game
Value Members
final
def
!=
(
arg0:
AnyRef
)
:
Boolean
Definition Classes
AnyRef
final
def
!=
(
arg0:
Any
)
:
Boolean
Definition Classes
Any
final
def
##
()
:
Int
Definition Classes
AnyRef → Any
final
def
==
(
arg0:
AnyRef
)
:
Boolean
Definition Classes
AnyRef
final
def
==
(
arg0:
Any
)
:
Boolean
Definition Classes
Any
def
_alphabeta
(
state:
STATE
,
depth:
Int
,
cutoff:
Map
[
PLAYER
,
Double
]
,
heuristic: (
STATE
) ⇒
Map
[
PLAYER
,
Double
]
)
: (
MOVE
,
Map
[
PLAYER
,
Double
])
Definition Classes
Game
def
alphabeta
(
state:
STATE
,
depth:
Int
,
heuristic: (
STATE
) ⇒
Map
[
PLAYER
,
Double
]
)
: (
MOVE
,
Map
[
PLAYER
,
Double
])
Definition Classes
Game
final
def
asInstanceOf
[
T0
]
:
T0
Definition Classes
Any
val
boardSize
:
Int
def
clone
()
:
AnyRef
Attributes
protected[
java.lang
]
Definition Classes
AnyRef
Annotations
@throws
()
implicit
val
convertPlayerId
:
FunctionPair
[
Double
,
Option
[
TicTacToePlayer
]]
final
def
eq
(
arg0:
AnyRef
)
:
Boolean
Definition Classes
AnyRef
def
finalize
()
:
Unit
Attributes
protected[
java.lang
]
Definition Classes
AnyRef
Annotations
@throws
()
def
gameStream
(
start:
STATE
,
intro:
Boolean
)
:
Stream
[
STATE
]
Definition Classes
Game
final
def
getClass
()
:
Class
[_]
Definition Classes
AnyRef → Any
def
introMessage
()
:
String
Definition Classes
TicTacToe
→ Game
final
def
isInstanceOf
[
T0
]
:
Boolean
Definition Classes
Any
def
minimax
(
state:
STATE
,
depth:
Int
,
heuristic: (
STATE
) ⇒
Map
[
PLAYER
,
Double
]
)
: (
MOVE
,
STATE
,
Map
[
PLAYER
,
Double
])
Definition Classes
Game
def
move
(
player:
TicTacToePlayer
,
position:
Int
)
:
TicTacToeMove
def
moveStateStream
(
s0:
STATE
)
:
Stream
[(
MOVE
,
STATE
)]
Definition Classes
Game
final
def
ne
(
arg0:
AnyRef
)
:
Boolean
Definition Classes
AnyRef
final
def
notify
()
:
Unit
Definition Classes
AnyRef
final
def
notifyAll
()
:
Unit
Definition Classes
AnyRef
def
numPositions
()
:
Int
val
o
:
TicTacToePlayer
val
oClass
:
String
def
play
(
start:
STATE
,
intro:
Boolean
)
:
Option
[
STATE
]
Definition Classes
Game
def
playContinuously
(
start:
STATE
)
:
STATE
Definition Classes
Game
def
player
(
id:
String
,
description:
String
,
which:
String
)
:
TicTacToePlayer
def
playerAfter
(
player:
TicTacToePlayer
)
:
TicTacToePlayer
def
players
()
:
Set
[
TicTacToePlayer
]
Definition Classes
TicTacToe
→ Game
val
playersSeq
:
Vector
[
TicTacToePlayer
]
def
scriptedMoveStateStream
(
state:
STATE
,
moveIt:
Iterator
[
MOVE
]
)
:
Stream
[(
MOVE
,
STATE
)]
Definition Classes
Game
def
startBoard
()
: (
tttmm
)#
Matrix
[
Option
[
TicTacToePlayer
]]
def
startFrom
(
s:
TicTacToeState
)
:
Some
[
TicTacToeState
]
Definition Classes
TicTacToe
→ Game
def
startState
()
:
TicTacToeState
Definition Classes
TicTacToe
→ Game
def
state
(
player:
TicTacToePlayer
,
board:
Matrix
[
Option
[
TicTacToePlayer
]]
,
eventQueue:
Map
[
TicTacToePlayer
,
List
[
Event
[
TicTacToe
]]]
)
:
Some
[
TicTacToeState
]
final
def
synchronized
[
T0
]
(
arg0: ⇒
T0
)
:
T0
Definition Classes
AnyRef
implicit
val
ttt
:
TicTacToe
val
tttmm
:
JblasMatrixModule
final
def
wait
()
:
Unit
Definition Classes
AnyRef
Annotations
@throws
()
final
def
wait
(
arg0:
Long
,
arg1:
Int
)
:
Unit
Definition Classes
AnyRef
Annotations
@throws
()
final
def
wait
(
arg0:
Long
)
:
Unit
Definition Classes
AnyRef
Annotations
@throws
()
val
x
:
TicTacToePlayer
val
xClass
:
String
Inherited from
Serializable
Inherited from
Serializable
Inherited from
Product
Inherited from
Equals
Inherited from
Game
[
TicTacToe
]
Inherited from
AnyRef
Inherited from
Any
Ungrouped
TicTacToe is a 2-player perfect information zero-sum game