msvc: Fix Win32 build error
This commit is contained in:
parent
8ae49592c7
commit
c2b913fff1
|
@ -53,6 +53,8 @@
|
||||||
#define MTDF_AI
|
#define MTDF_AI
|
||||||
//#define PERFECT_AI
|
//#define PERFECT_AI
|
||||||
|
|
||||||
|
//#define PERFECT_AI_TEST
|
||||||
|
|
||||||
#ifdef TEST_MODE
|
#ifdef TEST_MODE
|
||||||
#define DONOT_PLAY_SOUND
|
#define DONOT_PLAY_SOUND
|
||||||
#endif // TEST_MODE
|
#endif // TEST_MODE
|
||||||
|
|
12
millgame.sln
12
millgame.sln
|
@ -5,8 +5,6 @@ VisualStudioVersion = 16.0.29009.5
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "millgame", "millgame.vcxproj", "{D6EBE2B6-17F9-30EA-AE68-9CD0BB526200}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "millgame", "millgame.vcxproj", "{D6EBE2B6-17F9-30EA-AE68-9CD0BB526200}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perfect", "src\perfect\perfect.vcxproj", "{EDB1E279-1476-443B-84FA-150A5D3B5A10}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|x64 = Debug|x64
|
Debug|x64 = Debug|x64
|
||||||
|
@ -23,20 +21,12 @@ Global
|
||||||
{D6EBE2B6-17F9-30EA-AE68-9CD0BB526200}.Release|x64.Build.0 = Release|x64
|
{D6EBE2B6-17F9-30EA-AE68-9CD0BB526200}.Release|x64.Build.0 = Release|x64
|
||||||
{D6EBE2B6-17F9-30EA-AE68-9CD0BB526200}.Release|x86.ActiveCfg = Release|Win32
|
{D6EBE2B6-17F9-30EA-AE68-9CD0BB526200}.Release|x86.ActiveCfg = Release|Win32
|
||||||
{D6EBE2B6-17F9-30EA-AE68-9CD0BB526200}.Release|x86.Build.0 = Release|Win32
|
{D6EBE2B6-17F9-30EA-AE68-9CD0BB526200}.Release|x86.Build.0 = Release|Win32
|
||||||
{EDB1E279-1476-443B-84FA-150A5D3B5A10}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{EDB1E279-1476-443B-84FA-150A5D3B5A10}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{EDB1E279-1476-443B-84FA-150A5D3B5A10}.Debug|x86.ActiveCfg = Debug|Win32
|
|
||||||
{EDB1E279-1476-443B-84FA-150A5D3B5A10}.Debug|x86.Build.0 = Debug|Win32
|
|
||||||
{EDB1E279-1476-443B-84FA-150A5D3B5A10}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{EDB1E279-1476-443B-84FA-150A5D3B5A10}.Release|x64.Build.0 = Release|x64
|
|
||||||
{EDB1E279-1476-443B-84FA-150A5D3B5A10}.Release|x86.ActiveCfg = Release|Win32
|
|
||||||
{EDB1E279-1476-443B-84FA-150A5D3B5A10}.Release|x86.Build.0 = Release|Win32
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
Qt5Version = Qt5.13.0
|
|
||||||
SolutionGuid = {401C61DF-0B94-45A9-96C1-9BD069796A84}
|
SolutionGuid = {401C61DF-0B94-45A9-96C1-9BD069796A84}
|
||||||
|
Qt5Version = Qt5.13.0
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<IntermediateDirectory>release\</IntermediateDirectory>
|
<IntermediateDirectory>release\</IntermediateDirectory>
|
||||||
<PrimaryOutput>MillGame</PrimaryOutput>
|
<PrimaryOutput>MillGame</PrimaryOutput>
|
||||||
<EnableASAN>true</EnableASAN>
|
<EnableASAN>false</EnableASAN>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
<IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
|
<IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<IncludePath>$(ProjectDir)\src;$(ProjectDir)\include;$(ProjectDir)\src\ui\qt;$(ProjectDir)\src\test;$(IncludePath)</IncludePath>
|
<IncludePath>$(ProjectDir)src;$(ProjectDir)include;$(ProjectDir)src\ui\qt;$(ProjectDir)src\test;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<IncludePath>$(ProjectDir)\src\ui\qt;$(ProjectDir)\src\;$(ProjectDir)\include;$(ProjectDir)\src\test;$(IncludePath)</IncludePath>
|
<IncludePath>$(ProjectDir)\src\ui\qt;$(ProjectDir)\src\;$(ProjectDir)\include;$(ProjectDir)\src\test;$(IncludePath)</IncludePath>
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;$(QTDIR)\include;release;\include;$(QTDIR)\mkspecs\win32-msvc;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtMultimedia;$(QTDIR)\include\QtMultimediaWidgets;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtNetworkAuth;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;$(QTDIR)\include;release;\include;$(QTDIR)\mkspecs\win32-msvc;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtMultimedia;$(QTDIR)\include\QtMultimediaWidgets;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtNetworkAuth;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 /D_HAS_STD_BYTE=0 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<AssemblerListingLocation>release\</AssemblerListingLocation>
|
<AssemblerListingLocation>release\</AssemblerListingLocation>
|
||||||
<BrowseInformation>false</BrowseInformation>
|
<BrowseInformation>false</BrowseInformation>
|
||||||
<DebugInformationFormat>None</DebugInformationFormat>
|
<DebugInformationFormat>None</DebugInformationFormat>
|
||||||
|
@ -145,7 +145,7 @@
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>qtmain.lib;shell32.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Multimedia.lib;Qt5MultimediaWidgets.lib;Qt5Network.lib;Qt5Widgets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>qtmain.lib;shell32.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Multimedia.lib;Qt5MultimediaWidgets.lib;Qt5Network.lib;Qt5Widgets.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(QTDIR)\lib;C:\openssl\lib;C:\Utils\my_sql\my_sql\lib;C:\Utils\postgresql\pgsql\lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(QTDIR)\lib;C:\openssl\lib;C:\Utils\my_sql\my_sql\lib;C:\Utils\postgresql\pgsql\lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /LTCG %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /LTCG %(AdditionalOptions)</AdditionalOptions>
|
||||||
<DataExecutionPrevention>true</DataExecutionPrevention>
|
<DataExecutionPrevention>true</DataExecutionPrevention>
|
||||||
|
@ -194,7 +194,7 @@
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>$(ProjectDir)\src\ui\qt;$(ProjectDir)\src\ui;$(ProjectDir)\src\test;$(ProjectDir)\src;$(ProjectDir)\include;.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;$(QTDIR)\include;release;\include;$(QTDIR)\mkspecs\win32-msvc;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtMultimedia;$(QTDIR)\include\QtMultimediaWidgets;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtNetworkAuth;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(ProjectDir)\src\ui\qt;$(ProjectDir)\src\ui;$(ProjectDir)\src\test;$(ProjectDir)\src;$(ProjectDir)\include;.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;$(QTDIR)\include;release;\include;$(QTDIR)\mkspecs\win32-msvc;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtMultimedia;$(QTDIR)\include\QtMultimediaWidgets;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtNetworkAuth;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 /D_HAS_STD_BYTE=0 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<AssemblerListingLocation>release\</AssemblerListingLocation>
|
<AssemblerListingLocation>release\</AssemblerListingLocation>
|
||||||
<BrowseInformation>false</BrowseInformation>
|
<BrowseInformation>false</BrowseInformation>
|
||||||
<DebugInformationFormat>None</DebugInformationFormat>
|
<DebugInformationFormat>None</DebugInformationFormat>
|
||||||
|
@ -215,7 +215,7 @@
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>qtmain.lib;shell32.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Multimedia.lib;Qt5MultimediaWidgets.lib;Qt5Network.lib;Qt5Widgets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>qtmain.lib;shell32.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Multimedia.lib;Qt5MultimediaWidgets.lib;Qt5Network.lib;Qt5Widgets.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(QTDIR)\lib;C:\openssl\lib;C:\Utils\my_sql\my_sql\lib;C:\Utils\postgresql\pgsql\lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(QTDIR)\lib;C:\openssl\lib;C:\Utils\my_sql\my_sql\lib;C:\Utils\postgresql\pgsql\lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
|
||||||
<DataExecutionPrevention>true</DataExecutionPrevention>
|
<DataExecutionPrevention>true</DataExecutionPrevention>
|
||||||
|
@ -351,7 +351,7 @@
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>qtmaind.lib;shell32.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Multimediad.lib;Qt5MultimediaWidgetsd.lib;Qt5Networkd.lib;Qt5Widgetsd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>qtmaind.lib;shell32.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Multimediad.lib;Qt5MultimediaWidgetsd.lib;Qt5Networkd.lib;Qt5Widgetsd.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(QTDIR)\lib;C:\openssl\lib;C:\Utils\my_sql\my_sql\lib;C:\Utils\postgresql\pgsql\lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(QTDIR)\lib;C:\openssl\lib;C:\Utils\my_sql\my_sql\lib;C:\Utils\postgresql\pgsql\lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
|
||||||
<DataExecutionPrevention>true</DataExecutionPrevention>
|
<DataExecutionPrevention>true</DataExecutionPrevention>
|
||||||
|
@ -757,6 +757,7 @@
|
||||||
<ClCompile Include="src\perfect\minMaxAI.cpp" />
|
<ClCompile Include="src\perfect\minMaxAI.cpp" />
|
||||||
<ClCompile Include="src\perfect\perfect.cpp" />
|
<ClCompile Include="src\perfect\perfect.cpp" />
|
||||||
<ClCompile Include="src\perfect\perfectAI.cpp" />
|
<ClCompile Include="src\perfect\perfectAI.cpp" />
|
||||||
|
<ClCompile Include="src\perfect\perfect_test.cpp" />
|
||||||
<ClCompile Include="src\perfect\randomAI.cpp" />
|
<ClCompile Include="src\perfect\randomAI.cpp" />
|
||||||
<ClCompile Include="src\perfect\strLib.cpp" />
|
<ClCompile Include="src\perfect\strLib.cpp" />
|
||||||
<ClCompile Include="src\perfect\threadManager.cpp" />
|
<ClCompile Include="src\perfect\threadManager.cpp" />
|
||||||
|
|
|
@ -452,6 +452,9 @@
|
||||||
<ClCompile Include="src\perfect\perfect.cpp">
|
<ClCompile Include="src\perfect\perfect.cpp">
|
||||||
<Filter>Perfect AI Files</Filter>
|
<Filter>Perfect AI Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\perfect\perfect_test.cpp">
|
||||||
|
<Filter>Perfect AI Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="millgame.rc">
|
<ResourceCompile Include="millgame.rc">
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
/*********************************************************************\
|
|
||||||
config.h
|
|
||||||
Copyright (c) Thomas Weber. All rights reserved.
|
|
||||||
Copyright (C) 2021 The Sanmill developers (see AUTHORS file)
|
|
||||||
Licensed under the GPLv3 License.
|
|
||||||
https://github.com/madweasel/madweasels-cpp
|
|
||||||
\*********************************************************************/
|
|
||||||
|
|
||||||
#ifndef CONFIG_H
|
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
#define SELF_PLAY
|
|
||||||
|
|
||||||
#endif // CONFIG_H
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "perfect.h"
|
#include "perfect.h"
|
||||||
#include "position.h"
|
#include "position.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
// Perfect AI
|
// Perfect AI
|
||||||
Mill *mill = nullptr;
|
Mill *mill = nullptr;
|
||||||
|
@ -8,12 +9,6 @@ PerfectAI *ai = nullptr;
|
||||||
|
|
||||||
int perfect_init(void)
|
int perfect_init(void)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
char databaseDirectory[] = "D:\\database";
|
|
||||||
#elif _RELEASE_X64
|
|
||||||
char databaseDirectory[] = "";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (mill != nullptr || ai != nullptr) {
|
if (mill != nullptr || ai != nullptr) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -197,6 +192,7 @@ bool perfect_command(const char *cmd)
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
#if 0
|
||||||
args = sscanf(cmd, "Player%1u give up!", &t);
|
args = sscanf(cmd, "Player%1u give up!", &t);
|
||||||
|
|
||||||
// if (args == 1) {
|
// if (args == 1) {
|
||||||
|
@ -219,6 +215,7 @@ bool perfect_command(const char *cmd)
|
||||||
#endif /* THREEFOLD_REPETITION */
|
#endif /* THREEFOLD_REPETITION */
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// mill->getWinner() == 0
|
// mill->getWinner() == 0
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
#ifndef PERFECT_H
|
#ifndef PERFECT_H
|
||||||
#define PERFECT_H
|
#define PERFECT_H
|
||||||
|
|
||||||
|
|
||||||
#include "mill.h"
|
#include "mill.h"
|
||||||
#include "perfectAI.h"
|
#include "perfectAI.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
static const char databaseDirectory[] = "D:\\database";
|
||||||
|
|
||||||
extern Mill *mill;
|
extern Mill *mill;
|
||||||
extern PerfectAI *ai;
|
extern PerfectAI *ai;
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<IncludePath>$(ProjectDir)..;$(IncludePath)</IncludePath>
|
<IncludePath>$(ProjectDir)..\..\include;$(ProjectDir)..;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
|
|
|
@ -5,32 +5,34 @@
|
||||||
#include "miniMaxAI.h"
|
#include "miniMaxAI.h"
|
||||||
#include "randomAI.h"
|
#include "randomAI.h"
|
||||||
#include "perfectAI.h"
|
#include "perfectAI.h"
|
||||||
|
#include "perfect.h"
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
extern Mill *mill;
|
||||||
|
extern PerfectAI *ai;
|
||||||
|
|
||||||
unsigned int startTestFromLayer = 0;
|
unsigned int startTestFromLayer = 0;
|
||||||
|
|
||||||
unsigned int endTestAtLayer = NUM_LAYERS - 1;
|
unsigned int endTestAtLayer = NUM_LAYERS - 1;
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
char databaseDirectory[] = "D:\\database";
|
|
||||||
#elif _RELEASE_X64
|
|
||||||
char databaseDirectory[] = "";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool calculateDatabase = false;
|
bool calculateDatabase = false;
|
||||||
|
|
||||||
|
#ifdef PERFECT_AI_TEST
|
||||||
int main(void)
|
int main(void)
|
||||||
|
#else
|
||||||
|
int perfect_main(void)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
// locals
|
// locals
|
||||||
bool playerOneHuman = false;
|
bool playerOneHuman = false;
|
||||||
bool playerTwoHuman = false;
|
bool playerTwoHuman = false;
|
||||||
char ch[100];
|
char ch[100];
|
||||||
unsigned int from, to;
|
unsigned int from, to;
|
||||||
Mill *mill = new Mill();
|
mill = new Mill();
|
||||||
PerfectAI *ai = new PerfectAI(databaseDirectory);
|
ai = new PerfectAI(databaseDirectory);
|
||||||
|
|
||||||
SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS);
|
SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS);
|
||||||
srand(GetTickCount());
|
srand(GetTickCount());
|
||||||
|
@ -173,7 +175,6 @@ int main(void)
|
||||||
cout << "\n A program error has occurred!\n\n";
|
cout << "\n A program error has occurred!\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
|
||||||
char end;
|
char end;
|
||||||
cin >> end;
|
cin >> end;
|
||||||
|
|
|
@ -40,6 +40,7 @@ QString getAppFileName()
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef PERFECT_AI_TEST
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Bitboards::init();
|
Bitboards::init();
|
||||||
|
@ -60,6 +61,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
return QApplication::exec();
|
return QApplication::exec();
|
||||||
}
|
}
|
||||||
|
#endif // !PERFECT_AI_TEST
|
||||||
|
|
||||||
#endif // !UCT_DEMO
|
#endif // !UCT_DEMO
|
||||||
#endif // QT_GUI_LIB
|
#endif // QT_GUI_LIB
|
||||||
|
|
Loading…
Reference in New Issue