BasicBot got smarter

BasicBot can now search for values that are greater than, less than, or
equal to the best run values.
This commit is contained in:
BordynConfused 2015-10-22 13:21:20 -05:00
parent 4e7d03d9a3
commit 30f6b659f2
5 changed files with 4196 additions and 4017 deletions

View File

@ -531,9 +531,7 @@
<Compile Include="CustomControls\ViewportPanel.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="CustomControls\VirtualListView.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="CustomControls\VirtualListView.cs" />
<Compile Include="CustomControls\Win32.cs" />
<Compile Include="DisplayManager\DisplayManager.cs" />
<Compile Include="DisplayManager\DisplaySurface.cs" />

View File

@ -325,13 +325,13 @@
this.AppleDisksSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator31 = new System.Windows.Forms.ToolStripSeparator();
this.settingsToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.C64SubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.C64SettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.HelpSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.OnlineHelpMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ForumsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.FeaturesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AboutMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.C64SubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.C64SettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MainStatusBar = new StatusStripEx();
this.DumpStatusButton = new System.Windows.Forms.ToolStripDropDownButton();
this.EmuStatus = new System.Windows.Forms.ToolStripStatusLabel();
@ -473,7 +473,7 @@
//
this.OpenRomMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.OpenFile;
this.OpenRomMenuItem.Name = "OpenRomMenuItem";
this.OpenRomMenuItem.Size = new System.Drawing.Size(140, 22);
this.OpenRomMenuItem.Size = new System.Drawing.Size(152, 22);
this.OpenRomMenuItem.Text = "Open ROM";
this.OpenRomMenuItem.Click += new System.EventHandler(this.OpenRomMenuItem_Click);
//
@ -483,27 +483,27 @@
this.toolStripSeparator3});
this.RecentRomSubMenu.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Recent;
this.RecentRomSubMenu.Name = "RecentRomSubMenu";
this.RecentRomSubMenu.Size = new System.Drawing.Size(140, 22);
this.RecentRomSubMenu.Size = new System.Drawing.Size(152, 22);
this.RecentRomSubMenu.Text = "Recent ROM";
this.RecentRomSubMenu.DropDownOpened += new System.EventHandler(this.RecentRomMenuItem_DropDownOpened);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(57, 6);
this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6);
//
// CloseRomMenuItem
//
this.CloseRomMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Close;
this.CloseRomMenuItem.Name = "CloseRomMenuItem";
this.CloseRomMenuItem.Size = new System.Drawing.Size(140, 22);
this.CloseRomMenuItem.Size = new System.Drawing.Size(152, 22);
this.CloseRomMenuItem.Text = "&Close ROM";
this.CloseRomMenuItem.Click += new System.EventHandler(this.CloseRomMenuItem_Click);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(137, 6);
this.toolStripMenuItem1.Size = new System.Drawing.Size(149, 6);
//
// SaveStateSubMenu
//
@ -521,7 +521,7 @@
this.toolStripSeparator6,
this.SaveNamedStateMenuItem});
this.SaveStateSubMenu.Name = "SaveStateSubMenu";
this.SaveStateSubMenu.Size = new System.Drawing.Size(140, 22);
this.SaveStateSubMenu.Size = new System.Drawing.Size(152, 22);
this.SaveStateSubMenu.Text = "Save State";
this.SaveStateSubMenu.DropDownOpened += new System.EventHandler(this.SaveStateSubMenu_DropDownOpened);
//
@ -625,7 +625,7 @@
this.toolStripSeparator21,
this.AutoloadLastSlotMenuItem});
this.LoadStateSubMenu.Name = "LoadStateSubMenu";
this.LoadStateSubMenu.Size = new System.Drawing.Size(140, 22);
this.LoadStateSubMenu.Size = new System.Drawing.Size(152, 22);
this.LoadStateSubMenu.Text = "Load State";
this.LoadStateSubMenu.DropDownOpened += new System.EventHandler(this.LoadStateSubMenu_DropDownOpened);
//
@ -742,7 +742,7 @@
this.SaveToCurrentSlotMenuItem,
this.LoadCurrentSlotMenuItem});
this.SaveSlotSubMenu.Name = "SaveSlotSubMenu";
this.SaveSlotSubMenu.Size = new System.Drawing.Size(140, 22);
this.SaveSlotSubMenu.Size = new System.Drawing.Size(152, 22);
this.SaveSlotSubMenu.Text = "Save Slot";
this.SaveSlotSubMenu.DropDownOpened += new System.EventHandler(this.SaveSlotSubMenu_DropDownOpened);
//
@ -857,7 +857,7 @@
this.FlushSaveRAMMenuItem});
this.SaveRAMSubMenu.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.SaveRAMSubMenu.Name = "SaveRAMSubMenu";
this.SaveRAMSubMenu.Size = new System.Drawing.Size(140, 22);
this.SaveRAMSubMenu.Size = new System.Drawing.Size(152, 22);
this.SaveRAMSubMenu.Text = "Save RAM";
//
// FlushSaveRAMMenuItem
@ -871,7 +871,7 @@
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(137, 6);
this.toolStripMenuItem2.Size = new System.Drawing.Size(149, 6);
//
// MovieSubMenu
//
@ -891,7 +891,7 @@
this.FullMovieLoadstatesMenuItem,
this.MovieEndSubMenu});
this.MovieSubMenu.Name = "MovieSubMenu";
this.MovieSubMenu.Size = new System.Drawing.Size(140, 22);
this.MovieSubMenu.Size = new System.Drawing.Size(152, 22);
this.MovieSubMenu.Text = "Movie";
this.MovieSubMenu.DropDownOpened += new System.EventHandler(this.MovieSubMenu_DropDownOpened);
//
@ -1047,7 +1047,7 @@
this.CaptureOSDMenuItem,
this.SynclessRecordingMenuItem});
this.AVSubMenu.Name = "AVSubMenu";
this.AVSubMenu.Size = new System.Drawing.Size(140, 22);
this.AVSubMenu.Size = new System.Drawing.Size(152, 22);
this.AVSubMenu.Text = "AVI/WAV";
this.AVSubMenu.DropDownOpened += new System.EventHandler(this.AVSubMenu_DropDownOpened);
//
@ -1096,7 +1096,7 @@
this.toolStripSeparator20,
this.ScreenshotCaptureOSDMenuItem1});
this.ScreenshotSubMenu.Name = "ScreenshotSubMenu";
this.ScreenshotSubMenu.Size = new System.Drawing.Size(140, 22);
this.ScreenshotSubMenu.Size = new System.Drawing.Size(152, 22);
this.ScreenshotSubMenu.Text = "Screenshot";
this.ScreenshotSubMenu.DropDownOpening += new System.EventHandler(this.ScreenshotSubMenu_DropDownOpening);
//
@ -1147,13 +1147,13 @@
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(137, 6);
this.toolStripSeparator4.Size = new System.Drawing.Size(149, 6);
//
// ExitMenuItem
//
this.ExitMenuItem.Name = "ExitMenuItem";
this.ExitMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
this.ExitMenuItem.Size = new System.Drawing.Size(140, 22);
this.ExitMenuItem.Size = new System.Drawing.Size(152, 22);
this.ExitMenuItem.Text = "Exit";
this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click);
//
@ -2885,6 +2885,21 @@
this.settingsToolStripMenuItem1.Text = "&Settings...";
this.settingsToolStripMenuItem1.Click += new System.EventHandler(this.settingsToolStripMenuItem1_Click_1);
//
// C64SubMenu
//
this.C64SubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.C64SettingsMenuItem});
this.C64SubMenu.Name = "C64SubMenu";
this.C64SubMenu.Size = new System.Drawing.Size(39, 19);
this.C64SubMenu.Text = "&C64";
//
// C64SettingsMenuItem
//
this.C64SettingsMenuItem.Name = "C64SettingsMenuItem";
this.C64SettingsMenuItem.Size = new System.Drawing.Size(125, 22);
this.C64SettingsMenuItem.Text = "&Settings...";
this.C64SettingsMenuItem.Click += new System.EventHandler(this.C64SettingsMenuItem_Click);
//
// HelpSubMenu
//
this.HelpSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -2929,21 +2944,6 @@
this.AboutMenuItem.Text = "&About";
this.AboutMenuItem.Click += new System.EventHandler(this.AboutMenuItem_Click);
//
// C64SubMenu
//
this.C64SubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.C64SettingsMenuItem});
this.C64SubMenu.Name = "C64SubMenu";
this.C64SubMenu.Size = new System.Drawing.Size(39, 19);
this.C64SubMenu.Text = "&C64";
//
// C64SettingsMenuItem
//
this.C64SettingsMenuItem.Name = "C64SettingsMenuItem";
this.C64SettingsMenuItem.Size = new System.Drawing.Size(152, 22);
this.C64SettingsMenuItem.Text = "&Settings...";
this.C64SettingsMenuItem.Click += new System.EventHandler(this.C64SettingsMenuItem_Click);
//
// MainStatusBar
//
this.MainStatusBar.ClickThrough = true;

View File

@ -76,6 +76,10 @@
this.AttemptsLabel = new System.Windows.Forms.Label();
this.FramesLabel = new System.Windows.Forms.Label();
this.GoalGroupBox = new System.Windows.Forms.GroupBox();
this.Tiebreak3Operator = new System.Windows.Forms.ComboBox();
this.Tiebreak2Operator = new System.Windows.Forms.ComboBox();
this.Tiebreak1Operator = new System.Windows.Forms.ComboBox();
this.mainOperator = new System.Windows.Forms.ComboBox();
this.label12 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
@ -242,21 +246,21 @@
// _1ByteMenuItem
//
this._1ByteMenuItem.Name = "_1ByteMenuItem";
this._1ByteMenuItem.Size = new System.Drawing.Size(152, 22);
this._1ByteMenuItem.Size = new System.Drawing.Size(111, 22);
this._1ByteMenuItem.Text = "1 Byte";
this._1ByteMenuItem.Click += new System.EventHandler(this._1ByteMenuItem_Click);
//
// _2ByteMenuItem
//
this._2ByteMenuItem.Name = "_2ByteMenuItem";
this._2ByteMenuItem.Size = new System.Drawing.Size(152, 22);
this._2ByteMenuItem.Size = new System.Drawing.Size(111, 22);
this._2ByteMenuItem.Text = "2 Bytes";
this._2ByteMenuItem.Click += new System.EventHandler(this._2ByteMenuItem_Click);
//
// _4ByteMenuItem
//
this._4ByteMenuItem.Name = "_4ByteMenuItem";
this._4ByteMenuItem.Size = new System.Drawing.Size(152, 22);
this._4ByteMenuItem.Size = new System.Drawing.Size(111, 22);
this._4ByteMenuItem.Text = "4 Bytes";
this._4ByteMenuItem.Click += new System.EventHandler(this._4ByteMenuItem_Click);
//
@ -419,7 +423,7 @@
this.panel1.AutoScroll = true;
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panel1.Controls.Add(this.BestAttemptLogLabel);
this.panel1.Font = new System.Drawing.Font(System.Drawing.FontFamily.GenericMonospace.Name, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.panel1.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.panel1.Location = new System.Drawing.Point(12, 112);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(227, 251);
@ -430,7 +434,7 @@
this.BestAttemptLogLabel.AutoSize = true;
this.BestAttemptLogLabel.Location = new System.Drawing.Point(8, 8);
this.BestAttemptLogLabel.Name = "BestAttemptLogLabel";
this.BestAttemptLogLabel.Size = new System.Drawing.Size(130, 13);
this.BestAttemptLogLabel.Size = new System.Drawing.Size(294, 14);
this.BestAttemptLogLabel.TabIndex = 0;
this.BestAttemptLogLabel.Text = " ";
//
@ -512,7 +516,7 @@
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(53, 13);
this.label13.TabIndex = 0;
this.label13.Text = "Maximize:";
this.label13.Text = "Main Value:";
//
// label1
//
@ -554,6 +558,10 @@
//
this.GoalGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.GoalGroupBox.Controls.Add(this.Tiebreak3Operator);
this.GoalGroupBox.Controls.Add(this.Tiebreak2Operator);
this.GoalGroupBox.Controls.Add(this.Tiebreak1Operator);
this.GoalGroupBox.Controls.Add(this.mainOperator);
this.GoalGroupBox.Controls.Add(this.label12);
this.GoalGroupBox.Controls.Add(this.label11);
this.GoalGroupBox.Controls.Add(this.label10);
@ -574,12 +582,72 @@
this.GoalGroupBox.Size = new System.Drawing.Size(312, 150);
this.GoalGroupBox.TabIndex = 9;
this.GoalGroupBox.TabStop = false;
this.GoalGroupBox.Text = "Goal";
this.GoalGroupBox.Text = " ";
//
// Tiebreak3Operator
//
this.Tiebreak3Operator.FormattingEnabled = true;
this.Tiebreak3Operator.Items.AddRange(new object[] {
">",
">=",
"=",
"<=",
"<"});
this.Tiebreak3Operator.Location = new System.Drawing.Point(266, 119);
this.Tiebreak3Operator.Name = "Tiebreak3Operator";
this.Tiebreak3Operator.Size = new System.Drawing.Size(40, 21);
this.Tiebreak3Operator.TabIndex = 1009;
Tiebreak3Operator.SelectedIndex = 0;
//
// Tiebreak2Operator
//
this.Tiebreak2Operator.FormattingEnabled = true;
this.Tiebreak2Operator.Items.AddRange(new object[] {
">",
">=",
"=",
"<=",
"<"});
this.Tiebreak2Operator.Location = new System.Drawing.Point(266, 98);
this.Tiebreak2Operator.Name = "Tiebreak2Operator";
this.Tiebreak2Operator.Size = new System.Drawing.Size(40, 21);
this.Tiebreak2Operator.TabIndex = 1008;
Tiebreak2Operator.SelectedIndex = 0;
//
// Tiebreak1Operator
//
this.Tiebreak1Operator.FormattingEnabled = true;
this.Tiebreak1Operator.Items.AddRange(new object[] {
">",
">=",
"=",
"<=",
"<"});
this.Tiebreak1Operator.Location = new System.Drawing.Point(266, 76);
this.Tiebreak1Operator.Name = "Tiebreak1Operator";
this.Tiebreak1Operator.Size = new System.Drawing.Size(40, 21);
this.Tiebreak1Operator.TabIndex = 1007;
Tiebreak1Operator.SelectedIndex = 0;
//
// mainOperator
//
this.mainOperator.FormattingEnabled = true;
this.mainOperator.Items.AddRange(new object[] {
">",
">=",
"=",
"<=",
"<"});
this.mainOperator.Location = new System.Drawing.Point(266, 54);
this.mainOperator.Name = "mainOperator";
this.mainOperator.Size = new System.Drawing.Size(40, 21);
this.mainOperator.TabIndex = 1006;
mainOperator.SelectedIndex = 0;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(108, 124);
this.label12.Location = new System.Drawing.Point(74, 122);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(59, 13);
this.label12.TabIndex = 14;
@ -588,7 +656,7 @@
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(108, 102);
this.label11.Location = new System.Drawing.Point(73, 101);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(59, 13);
this.label11.TabIndex = 13;
@ -597,7 +665,7 @@
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(108, 79);
this.label10.Location = new System.Drawing.Point(73, 79);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(59, 13);
this.label10.TabIndex = 12;
@ -606,7 +674,7 @@
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(108, 56);
this.label9.Location = new System.Drawing.Point(73, 57);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(59, 13);
this.label9.TabIndex = 11;
@ -615,7 +683,7 @@
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(42, 124);
this.label7.Location = new System.Drawing.Point(6, 122);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(61, 13);
this.label7.TabIndex = 10;
@ -624,7 +692,7 @@
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(42, 102);
this.label6.Location = new System.Drawing.Point(6, 101);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(61, 13);
this.label6.TabIndex = 9;
@ -635,10 +703,10 @@
this.TieBreaker1Box.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TieBreaker1Box.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.TieBreaker1Box.Location = new System.Drawing.Point(167, 75);
this.TieBreaker1Box.Location = new System.Drawing.Point(139, 76);
this.TieBreaker1Box.Name = "TieBreaker1Box";
this.TieBreaker1Box.Nullable = true;
this.TieBreaker1Box.Size = new System.Drawing.Size(95, 20);
this.TieBreaker1Box.Size = new System.Drawing.Size(121, 20);
this.TieBreaker1Box.TabIndex = 1002;
//
// TieBreaker2Box
@ -646,10 +714,10 @@
this.TieBreaker2Box.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TieBreaker2Box.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.TieBreaker2Box.Location = new System.Drawing.Point(167, 98);
this.TieBreaker2Box.Location = new System.Drawing.Point(139, 98);
this.TieBreaker2Box.Name = "TieBreaker2Box";
this.TieBreaker2Box.Nullable = true;
this.TieBreaker2Box.Size = new System.Drawing.Size(95, 20);
this.TieBreaker2Box.Size = new System.Drawing.Size(121, 20);
this.TieBreaker2Box.TabIndex = 1003;
//
// TieBreaker3Box
@ -657,16 +725,16 @@
this.TieBreaker3Box.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TieBreaker3Box.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.TieBreaker3Box.Location = new System.Drawing.Point(167, 120);
this.TieBreaker3Box.Location = new System.Drawing.Point(139, 119);
this.TieBreaker3Box.Name = "TieBreaker3Box";
this.TieBreaker3Box.Nullable = true;
this.TieBreaker3Box.Size = new System.Drawing.Size(95, 20);
this.TieBreaker3Box.Size = new System.Drawing.Size(121, 20);
this.TieBreaker3Box.TabIndex = 1004;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(42, 79);
this.label5.Location = new System.Drawing.Point(7, 79);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(61, 13);
this.label5.TabIndex = 5;
@ -677,21 +745,21 @@
this.MaximizeAddressBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.MaximizeAddressBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.MaximizeAddressBox.Location = new System.Drawing.Point(167, 52);
this.MaximizeAddressBox.Location = new System.Drawing.Point(139, 54);
this.MaximizeAddressBox.Name = "MaximizeAddressBox";
this.MaximizeAddressBox.Nullable = true;
this.MaximizeAddressBox.Size = new System.Drawing.Size(95, 20);
this.MaximizeAddressBox.Size = new System.Drawing.Size(121, 20);
this.MaximizeAddressBox.TabIndex = 1001;
this.MaximizeAddressBox.TextChanged += new System.EventHandler(this.FrameLengthNumeric_ValueChanged);
//
// maximizeLabeltext
//
this.maximizeLabeltext.AutoSize = true;
this.maximizeLabeltext.Location = new System.Drawing.Point(50, 56);
this.maximizeLabeltext.Location = new System.Drawing.Point(7, 57);
this.maximizeLabeltext.Name = "maximizeLabeltext";
this.maximizeLabeltext.Size = new System.Drawing.Size(53, 13);
this.maximizeLabeltext.Size = new System.Drawing.Size(63, 13);
this.maximizeLabeltext.TabIndex = 3;
this.maximizeLabeltext.Text = "Maximize:";
this.maximizeLabeltext.Text = "Main Value:";
//
// label4
//
@ -921,5 +989,9 @@
private System.Windows.Forms.ToolStripMenuItem _1ByteMenuItem;
private System.Windows.Forms.ToolStripMenuItem _2ByteMenuItem;
private System.Windows.Forms.ToolStripMenuItem _4ByteMenuItem;
private System.Windows.Forms.ComboBox Tiebreak3Operator;
private System.Windows.Forms.ComboBox Tiebreak2Operator;
private System.Windows.Forms.ComboBox Tiebreak1Operator;
private System.Windows.Forms.ComboBox mainOperator;
}
}

View File

@ -284,6 +284,58 @@ namespace BizHawk.Client.EmuHawk
}
}
public byte MainComparisonType
{
get
{
return (byte)mainOperator.SelectedIndex;
}
set
{
if (value < 5) mainOperator.SelectedIndex = value;
else mainOperator.SelectedIndex = 0;
}
}
public byte Tie1ComparisonType
{
get
{
return (byte)Tiebreak1Operator.SelectedIndex;
}
set
{
if (value < 5) Tiebreak1Operator.SelectedIndex = value;
else Tiebreak1Operator.SelectedIndex = 0;
}
}
public byte Tie2ComparisonType
{
get
{
return (byte)Tiebreak2Operator.SelectedIndex;
}
set
{
if (value < 5) Tiebreak2Operator.SelectedIndex = value;
else Tiebreak2Operator.SelectedIndex = 0;
}
}
public byte Tie3ComparisonType
{
get
{
return (byte)Tiebreak3Operator.SelectedIndex;
}
set
{
if (value < 5) Tiebreak3Operator.SelectedIndex = value;
else Tiebreak3Operator.SelectedIndex = 0;
}
}
public string FromSlot
{
get
@ -392,6 +444,10 @@ namespace BizHawk.Client.EmuHawk
TieBreaker2Address = 0;
TieBreaker3Address = 0;
StartFromSlotBox.SelectedIndex = 0;
mainOperator.SelectedIndex = 0;
Tiebreak1Operator.SelectedIndex = 0;
Tiebreak2Operator.SelectedIndex = 0;
Tiebreak3Operator.SelectedIndex = 0;
UpdateBestAttempt();
}
@ -549,6 +605,11 @@ namespace BizHawk.Client.EmuHawk
public int TieBreak1 { get; set; }
public int TieBreak2 { get; set; }
public int TieBreak3 { get; set; }
public byte ComparisonTypeMain { get; set; }
public byte ComparisonTypeTie1 { get; set; }
public byte ComparisonTypeTie2 { get; set; }
public byte ComparisonTypeTie3 { get; set; }
public List<string> Log { get; set; }
}
@ -560,6 +621,10 @@ namespace BizHawk.Client.EmuHawk
public int TieBreaker1 { get; set; }
public int TieBreaker2 { get; set; }
public int TieBreaker3 { get; set; }
public byte ComparisonTypeMain { get; set; }
public byte ComparisonTypeTie1 { get; set; }
public byte ComparisonTypeTie2 { get; set; }
public byte ComparisonTypeTie3 { get; set; }
public int FrameLength { get; set; }
public string FromSlot { get; set; }
public long Attempts { get; set; }
@ -611,6 +676,20 @@ namespace BizHawk.Client.EmuHawk
TieBreaker1Address = botData.TieBreaker1;
TieBreaker2Address = botData.TieBreaker2;
TieBreaker3Address = botData.TieBreaker3;
try
{
MainComparisonType = botData.ComparisonTypeMain;
Tie1ComparisonType = botData.ComparisonTypeTie1;
Tie2ComparisonType = botData.ComparisonTypeTie2;
Tie3ComparisonType = botData.ComparisonTypeTie3;
}
catch
{
MainComparisonType = 0;
Tie1ComparisonType = 0;
Tie2ComparisonType = 0;
Tie3ComparisonType = 0;
}
FrameLength = botData.FrameLength;
FromSlot = botData.FromSlot;
Attempts = botData.Attempts;
@ -647,6 +726,10 @@ namespace BizHawk.Client.EmuHawk
TieBreaker1 = TieBreaker1Address,
TieBreaker2 = TieBreaker2Address,
TieBreaker3 = TieBreaker3Address,
ComparisonTypeMain = MainComparisonType,
ComparisonTypeTie1 = Tie1ComparisonType,
ComparisonTypeTie2 = Tie2ComparisonType,
ComparisonTypeTie3 = Tie3ComparisonType,
FromSlot = FromSlot,
FrameLength = FrameLength,
Attempts = Attempts,
@ -799,32 +882,50 @@ namespace BizHawk.Client.EmuHawk
private bool IsBetter(BotAttempt best, BotAttempt current)
{
if (current.Maximize > best.Maximize)
if (!TestValue(MainComparisonType, current.Maximize, best.Maximize))
{
return true;
return false;
}
else if (current.Maximize == best.Maximize)
{
if (current.TieBreak1 > best.TieBreak1)
if (!TestValue(Tie1ComparisonType, current.TieBreak1, best.TieBreak1))
{
return true;
return false;
}
else if (current.TieBreak1 == best.TieBreak1)
{
if (current.TieBreak2 > best.TieBreak2)
if (!TestValue(Tie2ComparisonType, current.TieBreak2, best.TieBreak2))
{
return true;
return false;
}
else if (current.TieBreak2 == best.TieBreak2)
{
if (current.TieBreak3 > current.TieBreak3)
if (!TestValue(Tie3ComparisonType, current.TieBreak3, current.TieBreak3))
{
return true;
return false;
}
}
}
}
return true;
}
private bool TestValue(byte operation, int currentValue, int bestValue)
{
switch (operation)
{
case 0:
return currentValue > bestValue;
case 1:
return currentValue >= bestValue;
case 2:
return currentValue == bestValue;
case 3:
return currentValue <= bestValue;
case 4:
return currentValue < bestValue;
}
return false;
}

View File

@ -1,6 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Version", "Version\Version.csproj", "{0CE8B337-08E3-4602-BF10-C4D4C75D2F13}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Client.Common", "BizHawk.Client.Common\BizHawk.Client.Common.csproj", "{24A0AA3C-B25F-4197-B23D-476D6462DBA0}"
@ -96,24 +98,28 @@ Global
{866F8D13-0678-4FF9-80A4-A3993FD4D8A3}.Release|Win32.ActiveCfg = Release|x86
{866F8D13-0678-4FF9-80A4-A3993FD4D8A3}.Release|x86.ActiveCfg = Release|x86
{866F8D13-0678-4FF9-80A4-A3993FD4D8A3}.Release|x86.Build.0 = Release|x86
{DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Win32.ActiveCfg = Debug|Any CPU
{DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Mixed Platforms.Build.0 = Debug|x86
{DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Win32.ActiveCfg = Debug|x86
{DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Win32.Build.0 = Debug|x86
{DD448B37-BA3F-4544-9754-5406E8094723}.Debug|x86.ActiveCfg = Debug|x86
{DD448B37-BA3F-4544-9754-5406E8094723}.Debug|x86.Build.0 = Debug|x86
{DD448B37-BA3F-4544-9754-5406E8094723}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{DD448B37-BA3F-4544-9754-5406E8094723}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{DD448B37-BA3F-4544-9754-5406E8094723}.Release|Win32.ActiveCfg = Release|Any CPU
{DD448B37-BA3F-4544-9754-5406E8094723}.Release|Mixed Platforms.ActiveCfg = Release|x86
{DD448B37-BA3F-4544-9754-5406E8094723}.Release|Mixed Platforms.Build.0 = Release|x86
{DD448B37-BA3F-4544-9754-5406E8094723}.Release|Win32.ActiveCfg = Release|x86
{DD448B37-BA3F-4544-9754-5406E8094723}.Release|Win32.Build.0 = Release|x86
{DD448B37-BA3F-4544-9754-5406E8094723}.Release|x86.ActiveCfg = Release|x86
{DD448B37-BA3F-4544-9754-5406E8094723}.Release|x86.Build.0 = Release|x86
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Win32.ActiveCfg = Debug|Any CPU
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Mixed Platforms.Build.0 = Debug|x86
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Win32.ActiveCfg = Debug|x86
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Win32.Build.0 = Debug|x86
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|x86.ActiveCfg = Debug|x86
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|x86.Build.0 = Debug|x86
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Win32.ActiveCfg = Release|Any CPU
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Mixed Platforms.ActiveCfg = Release|x86
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Mixed Platforms.Build.0 = Release|x86
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Win32.ActiveCfg = Release|x86
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Win32.Build.0 = Release|x86
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|x86.ActiveCfg = Release|x86
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|x86.Build.0 = Release|x86
{F51946EA-827F-4D82-B841-1F2F6D060312}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
@ -166,14 +172,16 @@ Global
{5160CFB1-5389-47C1-B7F6-8A0DC97641EE}.Release|Win32.ActiveCfg = Release|x86
{5160CFB1-5389-47C1-B7F6-8A0DC97641EE}.Release|x86.ActiveCfg = Release|x86
{5160CFB1-5389-47C1-B7F6-8A0DC97641EE}.Release|x86.Build.0 = Release|x86
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Win32.ActiveCfg = Debug|Any CPU
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Mixed Platforms.Build.0 = Debug|x86
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Win32.ActiveCfg = Debug|x86
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Win32.Build.0 = Debug|x86
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|x86.ActiveCfg = Debug|x86
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|x86.Build.0 = Debug|x86
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Win32.ActiveCfg = Release|Any CPU
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Mixed Platforms.ActiveCfg = Release|x86
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Mixed Platforms.Build.0 = Release|x86
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Win32.ActiveCfg = Release|x86
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Win32.Build.0 = Release|x86
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|x86.ActiveCfg = Release|x86
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|x86.Build.0 = Release|x86
{337CA23E-65E7-44E1-9411-97EE08BB8116}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
@ -211,18 +219,18 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{24A0AA3C-B25F-4197-B23D-476D6462DBA0} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
{DD448B37-BA3F-4544-9754-5406E8094723} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
{C4366030-6D03-424B-AE53-F4F43BB217C3} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
{24A0AA3C-B25F-4197-B23D-476D6462DBA0} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
{B95649F5-A0AE-41EB-B62B-578A2AFF5E18} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
{E1A23168-B571-411C-B360-2229E7225E0E} = {3627C08B-3E43-4224-9DA4-40BD69495FBC}
{F51946EA-827F-4D82-B841-1F2F6D060312} = {3627C08B-3E43-4224-9DA4-40BD69495FBC}
{E1A23168-B571-411C-B360-2229E7225E0E} = {3627C08B-3E43-4224-9DA4-40BD69495FBC}
{197D4314-8A9F-49BA-977D-54ACEFAEB6BA} = {3627C08B-3E43-4224-9DA4-40BD69495FBC}
{9F84A0B2-861E-4EF4-B89B-5E2A3F38A465} = {0540A9A6-977E-466D-8BD3-1D8590BD5282}
{5160CFB1-5389-47C1-B7F6-8A0DC97641EE} = {0540A9A6-977E-466D-8BD3-1D8590BD5282}
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
{337CA23E-65E7-44E1-9411-97EE08BB8116} = {0540A9A6-977E-466D-8BD3-1D8590BD5282}
{E6B436B1-A3CD-4C9A-8F76-5D7154726884} = {0540A9A6-977E-466D-8BD3-1D8590BD5282}
{B95649F5-A0AE-41EB-B62B-578A2AFF5E18} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = BizHawk.Client.EmuHawk\BizHawk.Client.EmuHawk.csproj