Skip to content

Commit

Permalink
fix for #31
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoang29 committed Oct 6, 2014
1 parent e79bdd2 commit 6e49008
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion explore/static/Interaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class ActionSet
{
for (u32 i = 0; i < count; i++)
{
m_action_set.push_back(MWTAction(i + 1)); // 1-based Action id
m_action_set.push_back(MWTAction(MWTAction::Make_OneBased(i))); // 1-based Action id
}
}

Expand Down
6 changes: 3 additions & 3 deletions explore/tests/MWTExploreTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,16 +317,16 @@ namespace vw_explore_tests
public:
static u32 Stateful_Default_Policy(int* policy_params, Context* applicationContext)
{
return *policy_params % m_num_actions + 1; // 1-based index
return MWTAction::Make_OneBased(*policy_params % m_num_actions);
}
static u32 Stateful_Default_Policy2(int* policy_params, Context* applicationContext)
{
return *policy_params % m_num_actions + 2; // 1-based index
return MWTAction::Make_OneBased(*policy_params % m_num_actions) + 1;
}

static u32 Stateless_Default_Policy(Context* applicationContext)
{
return 99 % m_num_actions + 1; // 1-based index
return MWTAction::Make_OneBased(99 % m_num_actions);
}

//TODO: For now assume the size of the score array is the number of action scores to
Expand Down

0 comments on commit 6e49008

Please sign in to comment.