-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathannealing.h
More file actions
35 lines (28 loc) · 899 Bytes
/
annealing.h
File metadata and controls
35 lines (28 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// Created by syeyoung on 8/9/24.
//
#ifndef WATERBOARD_ANNEALING_H
#define WATERBOARD_ANNEALING_H
#include "simulation.h"
#include <map>
#include <string>
#include <vector>
struct Point {
uint8_t x;
uint8_t y;
};
struct Action {
std::string name;
std::vector<Point> flips;
int moves;
};
void generateNew(Action* action, Node nodes[HEIGHT][WIDTH], int flips[], std::vector<Point>& targets);
std::vector<Action *> anneal(Node beginState[HEIGHT][WIDTH],
std::vector<Point>& targets,
std::vector<Point>& nonTargets,
std::vector<Action*>& currentActions,
std::vector<int>& idxes,
double tempMult,
double targetTemp,
int targetIteration);
#endif //WATERBOARD_ANNEALING_H