Skip to content

Commit

Permalink
reverted some changes that were lost during last merge
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoang29 committed Oct 6, 2014
1 parent 681edc8 commit 97ee4b5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion explore/static/Interaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ class MWTAction : public Serializable
u32 Get_Id() const { return m_id; }
u32 Get_Id_ZeroBased() const { return m_id - 1; }

static u32 Make_OneBased(u32 id) { return id + 1; }
static u32 Make_ZeroBased(u32 id) { return id - 1; }

//TODO: Consider making this virtual and extensible (depends on ActionSet and what we expose to the user)
bool Match(MWTAction& second_action)
{
Expand Down Expand Up @@ -92,7 +95,7 @@ class ActionSet

MWTAction Get(u32 id)
{
return m_action_set.at(id);
return m_action_set.at(MWTAction::Make_ZeroBased(id)); // Action ID is 1-based but index is 0-based
}

u32 Count()
Expand Down
6 changes: 3 additions & 3 deletions explore/tests/MWTExploreTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ public class MWTExploreTests
{
[TestMethod]
public void EpsilonGreedyStateful()
{
mwt.InitializeEpsilonGreedy(Epsilon,
{
float epsilon = 0;
mwt.InitializeEpsilonGreedy(epsilon,
new StatefulPolicyDelegate(TestStatefulPolicyFunc),
new IntPtr(PolicyParams),
NumActions);
Expand Down Expand Up @@ -86,7 +87,6 @@ private static void TestStatelessScorerFunc(IntPtr applicationContext, float[] s
}

private static readonly uint NumActions = 10;
private static readonly float Epsilon = 0.2f;
private static readonly uint Tau = 5;
private static readonly uint Bags = 2;
private static readonly float Lambda = 0.5f;
Expand Down
3 changes: 2 additions & 1 deletion vowpalwabbit/vw.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
VisualStudioVersion = 12.0.30501.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvw", "libvw.vcxproj", "{EA52DE0D-A5BE-4FB9-8C84-3A57BDFEBED9}"
ProjectSection(ProjectDependencies) = postProject
Expand Down Expand Up @@ -251,6 +251,7 @@ Global
{CB0C6B20-560C-4822-8EF6-DA999A64B542}.Debug|Mixed Platforms.Build.0 = Debug|x64
{CB0C6B20-560C-4822-8EF6-DA999A64B542}.Debug|Win32.ActiveCfg = Debug|x64
{CB0C6B20-560C-4822-8EF6-DA999A64B542}.Debug|x64.ActiveCfg = Debug|x64
{CB0C6B20-560C-4822-8EF6-DA999A64B542}.Debug|x64.Build.0 = Debug|x64
{CB0C6B20-560C-4822-8EF6-DA999A64B542}.Debug|x86.ActiveCfg = Debug|x64
{CB0C6B20-560C-4822-8EF6-DA999A64B542}.Release|Any CPU.ActiveCfg = Release|x64
{CB0C6B20-560C-4822-8EF6-DA999A64B542}.Release|Mixed Platforms.ActiveCfg = Release|x64
Expand Down

0 comments on commit 97ee4b5

Please sign in to comment.