This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEST(RandomPolicy, Mulligan) | |
{ | |
for (int i = 0; i < 100; ++i) | |
{ | |
GameConfig config; | |
config.player1Class = CardClass::ROGUE; | |
config.player2Class = CardClass::PALADIN; | |
config.startPlayer = PlayerType::RANDOM; | |
config.doShuffle = false; | |
config.doFillDecks = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
#include <condition_variable> | |
#include <iostream> | |
#include <mutex> | |
#include <thread> | |
using namespace std::chrono_literals; | |
int Func() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is a "Hello, world!" in C++ language by GCC for wandbox. | |
#include <iostream> | |
#include <regex> | |
int main() | |
{ | |
std::regex attackRegex("\\+([[:digit:]]+) Attack"); | |
std::string text = "Raid Leader is granting this minion +1 Attack"; | |
std::smatch values; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Tensor = Tensor<float>; | |
Graph g; | |
auto& input = g.Input(TensorShape(64, 32)); | |
auto& oneHot = g.Reshape(input, TensorShape(1, 2048)); | |
auto& output = g.DropOut(oneHot, 10); | |
auto& answer = g.Max(result); | |
for (int i = 0; i < trainNum; ++i) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <variant> | |
struct Fluid { }; | |
struct LightItem { }; | |
struct HeavyItem { }; | |
struct FragileItem { }; | |
struct GlassBox { }; | |
struct CardboardBox { }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <random> | |
#include <iostream> | |
class Rand | |
{ | |
public: | |
Rand() | |
{ | |
m_generator.seed(m_device()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline std::tuple<size_t, size_t> ParseValueRangeFromString(std::string str, | |
bool& isValid) | |
{ | |
std::regex reValueRange("([[:digit:]]+)(-[[:digit:]]+)?"); | |
std::smatch values; | |
size_t minValue = 0, maxValue = std::numeric_limits<size_t>::max(); | |
if (!str.empty()) | |
{ | |
if (std::regex_match(str, values, reValueRange)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************* | |
> File Name: Enums.h | |
> Project Name: Hearthstone++ | |
> Author: Chan-Ho Chris Ohk | |
> Purpose: Enumerations for card data. | |
> Created Time: 2017/08/11 | |
> Copyright (c) 2017, Chan-Ho Chris Ohk | |
*************************************************************************/ | |
#ifndef HEARTHSTONEPP_ENUMS_H | |
#define HEARTHSTONEPP_ENUMS_H |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************* | |
> File Name: main.cpp | |
> Project Name: CubbyFlow | |
> Author: Chan-Ho Chris Ohk | |
> Purpose: SPH Simulator | |
> Created Time: 2017/06/18 | |
> Copyright (c) 2018, Chan-Ho Chris Ohk | |
*************************************************************************/ | |
#include <Core/Array/ArrayUtils.h> | |
#include <Core/Collider/RigidBodyCollider3.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************* | |
> File Name: main.cpp | |
> Project Name: CubbyFlow | |
> Author: Chan-Ho Chris Ohk | |
> Purpose: SPH Simulator | |
> Created Time: 2017/06/18 | |
> Copyright (c) 2018, Chan-Ho Chris Ohk | |
*************************************************************************/ | |
#include <Core/Array/ArrayUtils.h> |