Difference between revisions of "Chess MapReduce Application"
Jump to navigation
Jump to search
(→reduce) |
|||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| + | =Chess= | ||
| + | ==[https://www.cse.wustl.edu/~dennis.cosgrove/courses/cse231/current/apidocs/edu/wustl/cse231s/chess/Game.html Game]== | ||
| + | |||
=Code To Investigate and Implement= | =Code To Investigate and Implement= | ||
==ChessMapper== | ==ChessMapper== | ||
| Line 18: | Line 21: | ||
==ChessReducer== | ==ChessReducer== | ||
{{CodeToImplement|ChessReducer|reduce|mapreduce.apps.chess.exercise}} | {{CodeToImplement|ChessReducer|reduce|mapreduce.apps.chess.exercise}} | ||
| + | ===reduce=== | ||
{{Sequential|public Map<Move, ResultTotalInfo> reduce(List<MoveResultPair> moveResultPairs)}} | {{Sequential|public Map<Move, ResultTotalInfo> reduce(List<MoveResultPair> moveResultPairs)}} | ||
| + | {{Warning|This class inherits from ClassicReducer. Be sure to have completed that exercise first.}} | ||
| + | |||
| + | =Testing Your Solution= | ||
| + | {{TestSuite|__ChessMapReduceAppTestSuite|mapreduce.apps.chess.exercise}} | ||
| + | |||
| + | =Client= | ||
| + | {{Client|OpeningExplorerApp|mapreduce.apps.chess.viz|main}} | ||
| + | |||
| + | [[File:What Would Jose Capablanca Do.png|600px]] | ||
| − | = | + | =Pledge, Acknowledgments, Citations= |
| − | {{ | + | {{Pledge|mapreduce-chess-app}} |
Latest revision as of 15:04, 6 March 2025
Contents
Chess
Game
Code To Investigate and Implement
ChessMapper
| class: | ChessMapper.java | |
| methods: | constructor isMoveAtIndexDesired map |
|
| package: | mapreduce.apps.chess.exercise | |
| source folder: | student/src/main/java |
constructor and instance variable
method: public ChessMapper(IntPredicate isMoveAtIndexDesired)
(sequential implementation only)
Hang onto the value of the isMoveAtIndexDesired parameter as an instance variable for later use.
isMoveAtIndexDesired
This method exists largely as a reminder to use the isMoveAtIndexDesired passed to the constructor.
map
Note: the ChessMapper is constructed with an IntPredicate. This IntPredicate should be passed to each game's positionResponsePairs method to potentially limit how many pairs you will emit.
method: public List<Map.Entry<Position, MoveResultPair>> map(Game game)
(sequential implementation only)
ChessReducer
| class: | ChessReducer.java | |
| methods: | reduce | |
| package: | mapreduce.apps.chess.exercise | |
| source folder: | student/src/main/java |
reduce
method: public Map<Move, ResultTotalInfo> reduce(List<MoveResultPair> moveResultPairs)
(sequential implementation only)
Testing Your Solution
| class: | __ChessMapReduceAppTestSuite.java | |
| package: | mapreduce.apps.chess.exercise | |
| source folder: | testing/src/test/java |
Client
| class: | OpeningExplorerApp.java | CLIENT |
| package: | mapreduce.apps.chess.viz | |
| source folder: | student/src/main/java |
Pledge, Acknowledgments, Citations
| file: | mapreduce-chess-app-pledge-acknowledgments-citations.txt |
More info about the Honor Pledge