Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ server/**/*.js
*.js.map
typings/*
*.gz
*-lock*
5,848 changes: 5,848 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ChineseChessAi",
"name": "chinese_chess_ai",
"version": "1.0.0",
"description": "AI Agent for Chinese Chess - Stanford CS 221 Projects",
"main": "gulpfile.js",
Expand Down Expand Up @@ -42,15 +42,15 @@
"typings": "1.3.2"
},
"devDependencies": {
"del": "2.2.1",
"angular2-in-memory-web-api": "0.0.20",
"systemjs": "0.19.27",
"concurrently": "^2.2.0",
"core-js": "2.4.1",
"del": "2.2.1",
"nodemon": "^1.19.4",
"reflect-metadata": "0.1.3",
"rxjs": " 5.4.2",
"zone.js": "0.6.23",
"concurrently": "2.0.0",
"nodemon": "1.9.1",
"systemjs-builder": "0.15.17"
"rxjs": "5.4.2",
"systemjs": "0.19.27",
"systemjs-builder": "^0.0.7",
"zone.js": "0.6.23"
}
}
2 changes: 0 additions & 2 deletions server/Strategy/ABPruning/ABPruning.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@

import { Agent } from '../Agent/Agent'
import { State } from '../State/State'
import { Evaluation } from '../_Param/Evaluation'

export class ABPruning extends Agent {

Expand Down
4 changes: 1 addition & 3 deletions server/Strategy/Agent/Agent.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { Piece } from '../../Objects/Piece';
import { Rule } from '../../ChineseChess/Rule/Rule'
import { InitGame } from '../../ChineseChess/InitGame/init';
import { GreedyAgent } from '../Greedy/GreedyAgent'
import { ABPruning } from '../ABPruning/ABPruning'
import { Evaluation } from '../_Param/Evaluation'
import { State } from '../State/State'

Expand Down Expand Up @@ -85,7 +83,7 @@ export class Agent {
// return [piece:Piece, toPos];
comptuteNextMove(state) {
console.log("BUG comptuteNextMove CALLED ")
return null;
return null;
}


Expand Down
3 changes: 0 additions & 3 deletions server/Strategy/Greedy/GreedyAgent.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@

import { Agent } from '../Agent/Agent'
import { Piece } from '../../Objects/Piece'
import { Evaluation } from '../_Param/Evaluation'

export class GreedyAgent extends Agent {

Expand Down
3 changes: 0 additions & 3 deletions server/Strategy/MCTS/MCTS.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@

import { Agent } from '../Agent/Agent'
import { State } from '../State/State'
import { StateFeatureExtractor } from '../State/StateFeatureExtractor'
import { MCTS_State } from './MCTS_State'

export class MCTS extends Agent {
Expand Down
2 changes: 0 additions & 2 deletions server/Strategy/MCTS/MCTS_State.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

import { Agent } from '../Agent/Agent'
import { State } from '../State/State'

export class MCTS_State {
Expand Down
3 changes: 0 additions & 3 deletions server/Strategy/Reorder/Reorder.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@

import { Agent } from '../Agent/Agent'
import { State } from '../State/State'
import { StateFeatureExtractor } from '../State/StateFeatureExtractor'
import { ABPruning } from '../ABPruning/ABPruning'
import { Evaluation } from '../_Param/Evaluation'

Expand Down
2 changes: 0 additions & 2 deletions server/Strategy/TDLearner/TDLearner.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

import { Agent } from '../Agent/Agent'
import { State } from '../State/State'
import { StateFeatureExtractor } from '../State/StateFeatureExtractor'
import { Evaluation } from '../_Param/Evaluation'
import { Reorder } from '../Reorder/Reorder'

export class TDLearner extends Reorder {
Expand Down
13 changes: 0 additions & 13 deletions server/Strategy/TDLearner/TDLearnerTrained.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@

import { Agent } from '../Agent/Agent'
import { State } from '../State/State'
import { StateFeatureExtractor } from '../State/StateFeatureExtractor'
import { Evaluation } from '../_Param/Evaluation'
import { TDLearner } from './TDLearner'
import { Reorder } from '../Reorder/Reorder'

export class TDLearnerTrained extends TDLearner {
strategy = 4;
weights = [20, 15, 30, 7, 20, 0, 20];

//
// static copyFromDict(dict) {
// return new TDLearnerTrained(dict.team, this.piecesFromDict(dict.myPieces), dict.DEPTH, this.weights);
// }


}