Commit fa7e9251 authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers

documentation fixes

parent 173f325d
Pipeline #1491 passed with stages
in 2 minutes and 36 seconds
......@@ -141,6 +141,7 @@ public class App {
*
* @param agentUnderTest The agent to be player 0
* @param agent The agent to make all the others
* @param seed the seed for the deck ordering
* @return GameStats for the game
*/
public static GameStats playMixed(String agentUnderTest, String agent, long seed) {
......
......@@ -98,6 +98,7 @@ public class App2Csv {
* This is a convenience wrapper around the player version of this function.
*
* @param gameID The gameID to log this game under
* @param agentUT agent under test
* @param name the names of the agents that are playing
* @param seed the seed to use for deck ordering
* @param agents the agents to use for the game
......@@ -139,6 +140,7 @@ public class App2Csv {
* This is the default game rules that the game comes with.
*
* @param gameID The gameID to log this game under
* @param agentUT agent under test
* @param name the names of the agents that are playing
* @param seed the seed to use for deck ordering
* @param players the players to use for the game
......@@ -153,6 +155,7 @@ public class App2Csv {
* Play a complete information (cheated) version of Hanabi
*
* @param gameID The gameID to log this game under
* @param agentUT agent under test
* @param name the names of the agents that are playing
* @param seed the seed to use for deck ordering
* @param players the players to use for the game
......@@ -167,6 +170,7 @@ public class App2Csv {
* Utility function that handles running and logging of the game to stdout in csv format
*
* @param gameID The gameID to log this game under
* @param agentUnderTest agent under test
* @param name the name of the agents that are playing
* @param seed the seed to use for the deck ordering
* @param runner the runner to use for this game
......
......@@ -11,9 +11,8 @@ public class BoardGameGeekFactory {
/**
* A factory implementing CliveJ's ruleset
*
* @link https://www.boardgamegeek.com/article/23427635#23427635
* @return
* see https://www.boardgamegeek.com/article/23427635#23427635
* @return the clivej agent
*/
@AgentBuilderStatic("clivej")
public static ProductionRuleAgent buildCliveJ() {
......
......@@ -249,9 +249,9 @@ public class HatGuessing implements Agent {
* the game, i.e. a card that if removed from the game will imply a perfect score cannot
* be obtained.
*
* @param agentID
* @param state
* @return
* @param agentID the current agentID
* @param state the current game state
* @return the recommendation that should be made
*/
public Recommendation doRecommend(int agentID, GameState state) {
......
......@@ -48,13 +48,6 @@ public class MCTS implements Agent {
this(roundLength, DEFAULT_ROLLOUT_DEPTH, DEFAULT_TREE_DEPTH_MUL);
}
/**
* Create an MCTS agent which has the parameters.
*
* @param roundLength
* @param rolloutDepth
* @param treeDepthMul
*/
@AgentConstructor("mcts")
public MCTS(int roundLength, int rolloutDepth, int treeDepthMul) {
this.roundLength = roundLength;
......
......@@ -12,7 +12,7 @@ import java.util.List;
import java.util.Random;
/**
* A filter agent which will consult its policy with 1-threshold probabilty, i.e. 0.4 -> execute policy 60% of the time,
* A filter agent which will consult its policy with 1-threshold probabilty, i.e. 0.4 means execute policy 60% of the time,
* execute a random move otherwise.
*
* This was created to test the agent's ability to work with noisy/inaccurate policies.
......
......@@ -39,13 +39,6 @@ public class MCTSExpConst implements Agent {
this(expConst, MCTSExpConst.NO_LIMIT, MCTSExpConst.NO_LIMIT);
}
/**
* Create an MCTS agent which has the parameters.
*
* @param expConst the exploration constant
* @param rolloutDepth
* @param treeDepthMul
*/
@AgentConstructor("mctsExpConst")
public MCTSExpConst(double expConst, int rolloutDepth, int treeDepthMul) {
this.expConst = expConst;
......
......@@ -29,13 +29,6 @@ public class MCTSPredictorExpConst extends MCTSExpConst {
this(expConst, MCTSExpConst.NO_LIMIT, MCTSExpConst.NO_LIMIT, agents);
}
/**
* Create an MCTS agent which has the parameters.
*
* @param expConst the exploration constant
* @param rolloutDepth
* @param treeDepthMul
*/
@AgentConstructor(App.PREDICTOR_MCTS+"ExpConst")
@Parameter(id=3, func="parseThemAsClones")
public MCTSPredictorExpConst(double expConst, int rolloutDepth, int treeDepthMul, Agent[] agents) {
......
......@@ -58,7 +58,7 @@ public class DeckModel {
* <p>
* These are used to calculate intial probabilities for cards in your hand and the deck.
*
* @param observableCards
* @param observableCards the cards that we can see
*/
public void initialObservations(List<Card> observableCards) {
for (Card card : observableCards) {
......
......@@ -108,6 +108,8 @@ public class RuleSet {
* Get a list of all rules present in the codebase which are not present in the list of permitted rules.
*
* This is useful for checking if any rules have been left out of the of the ruleset.
*
* @return any rules which are present in the framework but not in the above ruleset.
*/
public static Collection<Class<? extends Rule>> checkRuleSet(){
......
......@@ -84,9 +84,9 @@ public class TryToUnBlock extends AbstractRule {
/**
* Can a player cause an information token to become available during their turn?
*
* @param state
* @param playerID
* @return
* @param state the game state to check against
* @param playerID the player to check
* @return the move we can make to give this player a move.
*/
public Action isUnblocking(GameState state, int playerID) {
Hand hand = state.getHand(playerID);
......@@ -115,9 +115,9 @@ public class TryToUnBlock extends AbstractRule {
/**
* A blocked player is a player who has no safe play or discard move and has no information tokens to tell.
*
* @param state
* @param playerID
* @return
* @param state the state to check against
* @param playerID the playerID to check against
* @return true if the player is blocked, false otherwise
*/
public boolean isBlocked(GameState state, int playerID) {
Hand hand = state.getHand(playerID);
......
......@@ -72,9 +72,9 @@ public class PlayFinesse extends AbstractRule {
/**
* This method will return -1 if someone doesn't want us to know what order our cards were delt in.
*
* @param state
* @param playerID
* @return
* @param state the current game state
* @param playerID the current playerID
* @return -1 if the newest card is not known, else the slot containing the newest card
*/
public static int getNewestCard(GameState state, int playerID) {
try {
......
......@@ -41,10 +41,10 @@ public class DeckUtils {
* This should be used if the player has a perfect infomation copy of the state but should act like they don't.
* (mostly important for rule based AIs which can be used as predictors).
*
* @param player
* @param hand
* @param deck
* @return
* @param player the current player
* @param hand the current player's hand
* @param deck the cards in the deck
* @return a list of possible card bindings for each slot
*/
public static Map<Integer, List<Card>> bindBlindCard(int player, Hand hand, List<Card> deck) {
......
......@@ -97,6 +97,8 @@ public class HandUtils {
/**
* Will return the index of a card that matches the rule
*
* @param hand the hand we are checking against
* @param value The value we are looking for
* @return index of the card or -1 if there isn't one
*/
......
......@@ -19,9 +19,9 @@ import java.util.Map;
* Probability that it is useless.
* <p>
* Can be useless because of a number of reasons
* CardComponent.value <= table[CardComponent.colour]
* CardComponent.value <= min(table)
* CardComponent.value > max(possible(CardComponent.colour))
* CardComponent.value &lt;= table[CardComponent.colour]
* CardComponent.value &lt;= min(table)
* CardComponent.value &gt; max(possible(CardComponent.colour))
*/
public class DiscardProbablyUselessCard extends AbstractDiscardRule {
......
......@@ -557,7 +557,7 @@ public class BasicState implements GameState {
/**
* Automatically generated hashcode.
*
* @return
* @return a suitable hashcode
*/
@Override
public int hashCode() {
......
......@@ -94,7 +94,9 @@ public class Deck implements Serializable {
}
/**
* shuffle this deck with a prefined seed
* shuffle this deck with a predefined seed
*
* @param seed the seed to use for the new deck ordering
*/
public void shuffle(long seed) {
Collections.shuffle(cards, new Random(seed));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment