Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
46f0250
Added Clause
WilsonSunBritten Oct 19, 2016
8694765
nothing really
WilsonSunBritten Oct 19, 2016
3a251a5
Small things
WilsonSunBritten Oct 19, 2016
9b2f5fc
Problem generator now adds gold.
UNA8211 Oct 19, 2016
5c855b9
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 19, 2016
dbe1157
So painful..
z3k-io Oct 19, 2016
3a529ed
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 19, 2016
c4d3931
some explorerlogic
WilsonSunBritten Oct 19, 2016
fac031d
My Merge
WilsonSunBritten Oct 19, 2016
72ed6a2
Well fk me, im real lost in unification
z3k-io Oct 19, 2016
9cd355a
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 19, 2016
e523a7a
Merge remote-tracking branch 'refs/remotes/origin/Wilson_branch'
WilsonSunBritten Oct 19, 2016
10ed1fb
Map now imported into the World
UNA8211 Oct 19, 2016
4a05c40
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 19, 2016
b70d706
fix
WilsonSunBritten Oct 19, 2016
5579f13
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 19, 2016
2e20541
Explorers now both extend an agent class
z3k-io Oct 19, 2016
06208ff
Small progress
WilsonSunBritten Oct 19, 2016
1b7bc18
Merge remote-tracking branch 'origin/master'
WilsonSunBritten Oct 19, 2016
0c7fee6
did zachs extend thing
WilsonSunBritten Oct 19, 2016
4338e34
Moved position to Agent class, int arrays are silly
WilsonSunBritten Oct 19, 2016
9744e7b
Position changes
WilsonSunBritten Oct 19, 2016
8529038
WIP respawning
z3k-io Oct 19, 2016
9af1620
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 19, 2016
677c977
Started work on addRule method
UNA8211 Oct 19, 2016
bd87996
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 19, 2016
eeff2ee
Updates to ReactiveExplorer logic
z3k-io Oct 19, 2016
1a3066d
puncy change
WilsonSunBritten Oct 19, 2016
82bd140
addRule method works for one rule, continuing generalization
UNA8211 Oct 19, 2016
7b05ac2
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 19, 2016
1e128b0
Fixed stuff
UNA8211 Oct 19, 2016
fd46503
small thing
WilsonSunBritten Oct 19, 2016
baa22c2
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 19, 2016
7d9328b
more small changes
WilsonSunBritten Oct 19, 2016
878ad1e
Some more changes to ReactiveExplorer, it should be close to function…
z3k-io Oct 19, 2016
a566f18
starting follows
WilsonSunBritten Oct 19, 2016
1385f82
follows done hopefully, at least for a single fact
WilsonSunBritten Oct 19, 2016
bfad6a8
Death is now handled internally, also when ReactiveExplorer gets kill…
z3k-io Oct 19, 2016
aa3baff
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 19, 2016
1c31e52
World only returns the death percept if agent is killed and does not …
z3k-io Oct 19, 2016
1729f63
WIP: remove wumpus from board
z3k-io Oct 19, 2016
700c88b
Commit for pull
UNA8211 Oct 19, 2016
e33868b
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 19, 2016
22b9e62
sync up
WilsonSunBritten Oct 19, 2016
64ff482
Back to unification, with a plan this time!
z3k-io Oct 19, 2016
685b482
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 19, 2016
df52b91
More unification things
z3k-io Oct 19, 2016
5f15646
Unification shit..
z3k-io Oct 19, 2016
f7ee19e
Zach gives up on unification for now, left some notes and resources i…
z3k-io Oct 19, 2016
5be441c
Stuff
z3k-io Oct 19, 2016
122ff53
git gud ryan..
z3k-io Oct 19, 2016
de024dd
THINGS
z3k-io Oct 19, 2016
47c90c8
Things
z3k-io Oct 20, 2016
fee2a9a
Removed Skolem (fk that guy), world now updates percept map when wump…
z3k-io Oct 20, 2016
b0b743e
rules commented
WilsonSunBritten Oct 20, 2016
a61d3fe
Rules encoded
WilsonSunBritten Oct 20, 2016
4f7aef9
Idk what this is, i changed some things and then forgot. Im useful!
z3k-io Oct 20, 2016
20944b7
Wilson is amazing
WilsonSunBritten Oct 20, 2016
7abb3f7
DIRECTION IS NOW AN ENUM, GIT PISSED
z3k-io Oct 20, 2016
ef29978
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 20, 2016
ae42384
inference done?
WilsonSunBritten Oct 20, 2016
47e6825
Changes to location and direction handling, now with some fancy enum …
z3k-io Oct 20, 2016
41bfce6
Refactoring agent abstract class
z3k-io Oct 20, 2016
86cc2dd
More refactoring wow!
z3k-io Oct 20, 2016
39caff2
More LogicExplorer stuff...
z3k-io Oct 20, 2016
332cd14
Cleanup, removed iterator implementation from Zach's previous unifica…
z3k-io Oct 20, 2016
f136630
byte to int
WilsonSunBritten Oct 20, 2016
6c00c90
Removed rule methods
UNA8211 Oct 20, 2016
7906b06
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 20, 2016
fbeac59
Bytes and ints, trying to fix some errors
z3k-io Oct 20, 2016
7509cbd
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 20, 2016
457ece8
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 20, 2016
8a6bd9a
Wrote up bulk of unification. No testing done
UNA8211 Oct 20, 2016
8a3b151
Fixed minor issue with unification, added test case
UNA8211 Oct 20, 2016
f3cf78a
clone goes down all the way
WilsonSunBritten Oct 20, 2016
fe03b70
Debugging ReactiveExplorer
z3k-io Oct 20, 2016
e670cd4
Ewwww bugs
z3k-io Oct 20, 2016
3bbf3f9
ReactiveExplorer is fking retarded...bump into wall, turn, turn, bump…
z3k-io Oct 20, 2016
76424cf
AWWWWW
z3k-io Oct 20, 2016
6c1e2c3
the struggle continues..
z3k-io Oct 20, 2016
965c912
Added predicate check in unifier
UNA8211 Oct 20, 2016
7ddffce
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 20, 2016
a5e6cec
added wilsonifier
WilsonSunBritten Oct 20, 2016
dfcf5c3
kek
z3k-io Oct 20, 2016
9f49929
git gud zach hacky solution
WilsonSunBritten Oct 20, 2016
8919684
Merge remote-tracking branch 'origin/master'
WilsonSunBritten Oct 20, 2016
463d0b8
Something useless probably
UNA8211 Oct 20, 2016
5d8f5df
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 20, 2016
bb152ce
kek
z3k-io Oct 20, 2016
928838e
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 20, 2016
445d78f
start frontier
WilsonSunBritten Oct 20, 2016
915f076
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 20, 2016
0767a70
Fixed a knowledge base thing
UNA8211 Oct 20, 2016
1b08ac7
getforward
WilsonSunBritten Oct 20, 2016
969cf2b
KEK!
z3k-io Oct 20, 2016
4f6fe86
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 20, 2016
c4d15c0
logic progress
WilsonSunBritten Oct 20, 2016
f9faa26
Dead wumpussy
UNA8211 Oct 20, 2016
6a54da9
i didnt break it, i sware!
z3k-io Oct 20, 2016
ced575a
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 20, 2016
45efa1f
good changes
WilsonSunBritten Oct 20, 2016
88c1df2
toPush
WilsonSunBritten Oct 21, 2016
76c45ab
Merge remote-tracking branch 'origin/master'
WilsonSunBritten Oct 21, 2016
19547c7
push
WilsonSunBritten Oct 21, 2016
78b0c98
idiots now start at correct position
UNA8211 Oct 21, 2016
d5d0db3
sall
WilsonSunBritten Oct 21, 2016
ef16bb6
fa
WilsonSunBritten Oct 21, 2016
aa207ce
push
WilsonSunBritten Oct 21, 2016
86dad18
stuff
WilsonSunBritten Oct 21, 2016
10a9a3d
failing at fixing reactivexplorer
UNA8211 Oct 21, 2016
7f1a76b
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 21, 2016
9649cc6
well fk me mate
z3k-io Oct 21, 2016
1a4d3ef
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 21, 2016
caf33e3
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 21, 2016
a40d16b
stuff
WilsonSunBritten Oct 21, 2016
8e22b85
stuff
WilsonSunBritten Oct 21, 2016
54eba92
Fucking reactiveexplorer
UNA8211 Oct 21, 2016
529963e
fuuuuuck
z3k-io Oct 21, 2016
9cbdd97
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 21, 2016
7d3413d
ting
WilsonSunBritten Oct 21, 2016
cc025a7
testa
WilsonSunBritten Oct 21, 2016
ab40cb7
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 21, 2016
e3a9920
ugggh
z3k-io Oct 21, 2016
6559cc2
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 21, 2016
90bf76a
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 21, 2016
61fbf96
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 21, 2016
8cf458a
kek
z3k-io Oct 21, 2016
7428860
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 21, 2016
7cbc13d
pfafds
WilsonSunBritten Oct 21, 2016
f684470
awwww
z3k-io Oct 21, 2016
a0f0ee5
good stuff
WilsonSunBritten Oct 21, 2016
9ff8b1a
Merge remote-tracking branch 'origin/master'
WilsonSunBritten Oct 21, 2016
e0a0a73
fa
WilsonSunBritten Oct 21, 2016
5b409bc
maybe fixed board stuff
UNA8211 Oct 21, 2016
1dae85d
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 21, 2016
61b54fd
jlk
WilsonSunBritten Oct 21, 2016
7b86dc5
fe
z3k-io Oct 21, 2016
1d4fba3
stench is not spelt with a second t... get gud
z3k-io Oct 21, 2016
111cff8
lkj
WilsonSunBritten Oct 21, 2016
326aa43
Merge remote-tracking branch 'origin/master'
WilsonSunBritten Oct 21, 2016
c4baa50
This might work for the path finding, as soon as i finish the travers…
z3k-io Oct 21, 2016
1b152df
dying should be done in the space you would move to, without actually…
WilsonSunBritten Oct 21, 2016
e174696
okok
WilsonSunBritten Oct 21, 2016
e65ab50
small opt
WilsonSunBritten Oct 21, 2016
5dcf893
smallish changes
WilsonSunBritten Oct 21, 2016
971da10
fixed a break
WilsonSunBritten Oct 21, 2016
af70d65
goTo mostly working? its getting called way too often though so weir…
z3k-io Oct 21, 2016
0261f85
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 21, 2016
8871606
Found no solution really really fast
WilsonSunBritten Oct 21, 2016
73e2453
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 21, 2016
3f73add
Theres some problem with him running into walls that dont exist?
z3k-io Oct 21, 2016
255cf03
Some cleanup and readability stuff, change to death percepts...lets j…
z3k-io Oct 21, 2016
b515cc9
Holy shit it's working
WilsonSunBritten Oct 21, 2016
b1a0828
working even better now
WilsonSunBritten Oct 21, 2016
8563bd6
big important changes
WilsonSunBritten Oct 21, 2016
04d98f0
glory to me
WilsonSunBritten Oct 21, 2016
dbd648a
another fix by Wilson
WilsonSunBritten Oct 21, 2016
d624e69
good fixes
WilsonSunBritten Oct 21, 2016
1360897
something
UNA8211 Oct 21, 2016
64f545e
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 21, 2016
5e91724
wuuuuu
WilsonSunBritten Oct 21, 2016
3104fbc
fixes
WilsonSunBritten Oct 21, 2016
291632b
Reactive explorer can grab gold
UNA8211 Oct 21, 2016
a793231
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 21, 2016
50aa115
thing
WilsonSunBritten Oct 21, 2016
62ca688
fk u git
z3k-io Oct 21, 2016
ce3374f
neater printing
z3k-io Oct 21, 2016
c4ae140
fix
WilsonSunBritten Oct 21, 2016
cb58e3b
Merge remote-tracking branch 'origin/master'
WilsonSunBritten Oct 21, 2016
cf79ef0
output now much easier to read.
z3k-io Oct 21, 2016
9c8ca99
mychanges
WilsonSunBritten Oct 21, 2016
74691fc
Can now randomly place start and gold on pre-existing map
UNA8211 Oct 21, 2016
b1a9249
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 21, 2016
54c7c09
fk your spaceing
z3k-io Oct 21, 2016
fccf113
things
WilsonSunBritten Oct 21, 2016
b0f2c34
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 21, 2016
26c2b19
commit
WilsonSunBritten Oct 21, 2016
68c2334
Merge remote-tracking branch 'origin/master'
WilsonSunBritten Oct 21, 2016
fff7013
did that do it?
WilsonSunBritten Oct 21, 2016
d9f7db2
amazing stuff
WilsonSunBritten Oct 22, 2016
019f1c2
Made driver less retarded
UNA8211 Oct 22, 2016
af6eef9
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 22, 2016
7295eca
can find wumpus now... well kb can
WilsonSunBritten Oct 22, 2016
9822086
Merge remote-tracking branch 'origin/master'
WilsonSunBritten Oct 22, 2016
8d5e7f3
beauty
WilsonSunBritten Oct 22, 2016
ecdc446
stuff
WilsonSunBritten Oct 22, 2016
f5bed3b
turn more/less at the same time
WilsonSunBritten Oct 22, 2016
07af19a
fixer upper
WilsonSunBritten Oct 22, 2016
d94a64b
I'm awesome, I know
WilsonSunBritten Oct 22, 2016
c33a240
more wilson stuff
WilsonSunBritten Oct 22, 2016
57ba457
last push of the night I hope
WilsonSunBritten Oct 22, 2016
2d24e41
quick fix
WilsonSunBritten Oct 22, 2016
5888b6f
fixed wumpus death stuff
WilsonSunBritten Oct 22, 2016
e47146d
Updates to movement, still a problem with shooting
z3k-io Oct 22, 2016
21792ed
Fixed wumpus slaying issue on border conditions, path traversal working?
z3k-io Oct 22, 2016
9dc5848
small fix
WilsonSunBritten Oct 22, 2016
7801c77
Merge remote-tracking branch 'origin/master'
WilsonSunBritten Oct 22, 2016
4aba24d
Is it so?
z3k-io Oct 22, 2016
f9a0a45
tweaks
z3k-io Oct 22, 2016
ff0fceb
not adjacent if you're there...
WilsonSunBritten Oct 22, 2016
6c3d56a
im mean, u can just uncomment things..
z3k-io Oct 22, 2016
5659931
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 22, 2016
ca78371
kek
z3k-io Oct 22, 2016
0e37620
closer?
z3k-io Oct 22, 2016
b21f9e7
now regularly solves 15x15 boards?
z3k-io Oct 22, 2016
67bc5ec
is it so?
z3k-io Oct 22, 2016
3837835
tweaks
z3k-io Oct 22, 2016
c193ad9
Here
WilsonSunBritten Oct 22, 2016
43ddeea
Check this one out, he keeps jumping in a pit..
z3k-io Oct 22, 2016
d83d4e7
driver
z3k-io Oct 22, 2016
ae122ba
this fix got lost fucking spacing
WilsonSunBritten Oct 22, 2016
a52b1d8
Merge remote-tracking branch 'origin/master'
WilsonSunBritten Oct 22, 2016
99da3b2
Heres a case where the frontier is never > 0 , exception thrown
z3k-io Oct 22, 2016
f849ae0
May have fixed
z3k-io Oct 22, 2016
6c800a8
fixy fix
WilsonSunBritten Oct 22, 2016
9cda961
Merge remote-tracking branch 'origin/master'
WilsonSunBritten Oct 22, 2016
208427a
Wumpus killing problem
WilsonSunBritten Oct 23, 2016
6fe27c9
fixed
WilsonSunBritten Oct 23, 2016
dba387f
very small but important fix
WilsonSunBritten Oct 23, 2016
64f7a88
Bad thing
WilsonSunBritten Oct 23, 2016
1bae563
Some code cleanup, cause zach is ocd and likes to fk with wilson's sp…
z3k-io Oct 23, 2016
da3ea42
Obstacle, bitch
WilsonSunBritten Oct 23, 2016
7476c42
x2
WilsonSunBritten Oct 23, 2016
4d7ac49
sexy fix
WilsonSunBritten Oct 23, 2016
bcc9c7d
added stuff to keep track of 'major decisions'
WilsonSunBritten Oct 23, 2016
8f81eb5
Zach's great code clean up, removed a bunch of deprecated functions, …
z3k-io Oct 23, 2016
ce40b1d
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
WilsonSunBritten Oct 23, 2016
2d9742f
and now we're synced?
WilsonSunBritten Oct 23, 2016
2c69461
quiting
z3k-io Oct 23, 2016
707aa7f
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 23, 2016
286df5e
Testing with reactive
UNA8211 Oct 23, 2016
8659192
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
UNA8211 Oct 23, 2016
162348d
stupid fucking switches
UNA8211 Oct 23, 2016
85cf5f4
Removed the return statements after bumping, still want the direction…
UNA8211 Oct 23, 2016
fdba5a6
Undone what I did. Causes it to not break for some reason
UNA8211 Oct 23, 2016
fb398ce
Can now kill wimps
z3k-io Oct 23, 2016
256794d
Merge branch 'master' of https://github.com/WilsonSunBritten/Wumpus
z3k-io Oct 23, 2016
c85c536
This guy's fuckin stupid..
z3k-io Oct 23, 2016
5ed80e5
Forgot a boundary check
z3k-io Oct 23, 2016
77278e5
Theres a problem right now with not keeping track of location properl…
z3k-io Oct 23, 2016
c6e6e36
Theres an out of bounds problem, investigating..
z3k-io Oct 23, 2016
3a2e0ec
Fixing out of bounds...WIP
z3k-io Oct 24, 2016
8c96ec5
fixed?
z3k-io Oct 24, 2016
966dd9c
nice convenience things
WilsonSunBritten Oct 24, 2016
c37ae34
wilson stuff on reactive
WilsonSunBritten Oct 24, 2016
292ab58
Wilson changes
WilsonSunBritten Oct 24, 2016
dafb6a4
default variable value to -1
WilsonSunBritten Oct 24, 2016
d0177fe
Zach's big clean up for to submit.
z3k-io Oct 24, 2016
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
17 changes: 17 additions & 0 deletions .merge_file_a08396
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

import java.util.ArrayList;
import java.util.Iterator;
/*
A clause contains a list of predicates
*/
public class Clause implements Iterable {


ArrayList<Fact> facts = new ArrayList<>();

@Override
public Iterator iterator() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

}
21 changes: 21 additions & 0 deletions Wumpus/PerceptBoard.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
20 11 0
0 0 0 0 0 0 0 1 16 5 2 0 0 0 1 0 4 0 1 18
0 0 0 0 0 0 1 0 1 2 33 2 0 1 16 1 0 0 2 33
0 0 0 0 4 1 16 1 0 1 18 3 1 0 1 0 0 0 0 2
0 0 0 0 0 0 1 0 0 0 3 33 18 1 1 0 4 0 0 0
0 0 1 0 0 0 0 0 0 4 0 2 1 1 16 1 0 0 0 0
0 1 16 1 0 1 2 0 0 0 0 0 0 0 1 0 0 0 0 0
0 1 1 0 1 18 33 2 0 2 0 0 0 0 0 0 2 0 0 1
1 16 1 0 0 1 2 0 2 32 2 0 0 0 0 2 32 2 1 16
0 1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 2 0 0 1
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0
1 16 1 0 0 0 0 0 0 0 0 0 0 0 0 0 2 32 2 2
0 1 4 0 2 0 0 0 0 2 0 0 0 0 0 0 0 2 2 32
0 0 4 2 32 2 0 0 2 32 2 0 0 0 0 0 0 0 0 2
4 0 0 0 2 0 0 0 4 2 0 1 4 0 0 0 0 4 0 0
0 0 0 2 32 2 0 0 0 0 1 16 1 0 0 4 0 0 0 0
0 2 0 0 2 2 0 1 0 0 0 1 0 0 0 0 0 4 0 0
3 32 2 4 2 32 3 16 1 0 0 0 0 0 0 0 0 0 0 0
16 3 0 0 0 2 1 1 0 0 0 0 2 0 0 0 8 0 2 0
1 0 0 0 0 5 16 1 0 4 0 2 32 2 0 1 0 2 32 6
0 0 0 0 0 4 1 0 4 0 0 0 2 0 1 16 1 0 2 0
21 changes: 21 additions & 0 deletions Wumpus/clean.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
20
0 0 0 0 0 0 0 0 H I 0 0 0 0 0 0 I 0 0 H
0 0 0 0 0 0 0 0 0 0 W 0 0 0 H 0 0 0 0 W
0 0 0 0 I 0 H 0 0 0 H 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 W H 0 0 0 I 0 0 0
0 0 0 0 0 0 0 0 0 I 0 0 0 0 H 0 0 0 0 0
0 0 H 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 H W 0 0 0 0 0 0 0 0 0 0 0 0 0
0 H 0 0 0 0 0 0 0 W 0 0 0 0 0 0 W 0 0 H
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 H 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 W 0 0
0 0 I 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 W
0 0 I 0 W 0 0 0 0 W 0 0 0 0 0 0 0 0 0 0
I 0 0 0 0 0 0 0 I 0 0 0 I 0 0 0 0 I 0 0
0 0 0 0 W 0 0 0 0 0 0 H 0 0 0 I 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 I 0 0
0 W 0 I 0 W 0 H 0 0 0 0 0 0 0 0 0 0 0 0
H 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 I H 0 0 I 0 0 W 0 0 0 0 0 W I
0 0 0 0 0 I 0 0 I 0 0 0 0 0 0 H 0 0 0 0
104 changes: 104 additions & 0 deletions Wumpus/src/Agent.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@

import java.util.Random;
/*
Agent super class, holds functions variables and constants relavent to both
logical and reactive exploreres
*/

public class Agent {

protected Location location;
protected int direction, arrowCount;
protected final byte BREEZE = 0b00000001, STENCH = 0b0000010, BUMP = 0b00000100, GLITTER = 0b00001000, DEATH_PIT = 0b00010000, DEATH_WUMPUS = 0b00100000, SCREAM = 0b01000000;
protected static final int GRAB = 1, MOVE = 2, TURN_LEFT = 3, TURN_RIGHT = 4, SHOOT = 5, QUIT = 6;
protected static final int NORTH = 0, EAST = 1, SOUTH = 2, WEST = 3;
protected byte percepts;
protected World world;
protected Random random = new Random();

public Agent(World world, int startingArrowCount, int startingX, int startingY, int startingDirection) {
this.world = world;
this.arrowCount = startingArrowCount;
this.location = new Location(startingX, startingY);
this.direction = startingDirection;
this.percepts = world.getPercepts();
}

public Location getForward() {
switch (direction) {
case NORTH:
return new Location(location.x, location.y + 1);
case EAST:
return new Location(location.x + 1, location.y);
case SOUTH:
return new Location(location.x, location.y - 1);
default:
return new Location(location.x - 1, location.y);
}
}

public void turnRight() {
direction = (direction + 1) % 4;
world.action(TURN_RIGHT);
}

public void turnLeft() {
direction = (direction + 3) % 4;
world.action(TURN_LEFT);
}

public int getRight() {
return (direction + 1) % 4;
}

public int getLeft() {
return (direction + 3) % 4;
}

public void updateLocation() {
switch (direction) {
case NORTH:
if (location.y < World.size - 1) {
location.y += 1;
}
break;
case WEST:
if (location.x > 0) {
location.x -= 1;
}
break;
case SOUTH:
if (location.y > 0) {
location.y--;
}
break;
case EAST:
if (location.x < World.size - 1) {
location.x++;
}
}
}

public enum State {

SAFE,
UNSAFE,
EXPLORED,
UNEXPLORED;
}

protected class Location {

int x;
int y;

public Location(int x, int y) {
this.x = x;
this.y = y;
}

public boolean equals(Location location) {
return (this.x == location.x && this.y == location.y);
}
}
}
4 changes: 0 additions & 4 deletions Wumpus/src/AtomicTerm.java

This file was deleted.

34 changes: 34 additions & 0 deletions Wumpus/src/Clause.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

import java.util.ArrayList;

/*
A clause contains a list of predicates
*/
public class Clause {

ArrayList<Fact> facts = new ArrayList<>();

public Clause() {
}

public Clause(Clause clause) {
for (Fact tempFact : clause.facts) {
facts.add(new Fact(tempFact));
}
}

public Clause(Fact fact) {

facts.add(fact);
}

public static void printClause(Clause clause) {
for (Fact fact : clause.facts) {
fact.printFact();
if (fact != clause.facts.get(clause.facts.size() - 1)) {
System.out.print(" v ");
}
}
System.out.println("");
}
}
49 changes: 0 additions & 49 deletions Wumpus/src/ComplexSentence.java

This file was deleted.

20 changes: 0 additions & 20 deletions Wumpus/src/Connective.java

This file was deleted.

64 changes: 45 additions & 19 deletions Wumpus/src/Driver.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,53 @@
public class Driver {

public static void main(String[] args) throws IOException {
Driver driver = new Driver();
Tester tester = new Tester();
tester.testInferenceEngine();
//driver.makeGame();
// Driver driver = new Driver();
// Tester tester = new Tester();
// tester.testPathFinder();
//Tester tester = new Tester();
//tester.testPathFinder();
//tester.testUnify();
// tester.testInferenceEngine();
makeGame();
// World world = new World("PerceptBoard.txt");
// world.startGame("LogicExplorer");
}

public void makeGame() throws IOException {

BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));
int[] prob = new int[3];
System.out.print("% chance of generating pit: ");
prob[0] = Integer.parseInt(dataIn.readLine());
System.out.println();
System.out.print("% chance of generating obstacle: ");
prob[1] = Integer.parseInt(dataIn.readLine());
System.out.println("");
System.out.print("% chance of generating wumpus: ");
prob[2] = Integer.parseInt(dataIn.readLine());
System.out.println("");

WumpusGame game = new WumpusGame(5, prob);
public static void makeGame() throws IOException {

boolean newBoard = true;
boolean newStart = true;
WumpusGame game;
if (newBoard) {
BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));
int[] prob = new int[3];
System.out.println("Size of board: ");

int size = 20;//Integer.parseInt(dataIn.readLine());
System.out.print("% chance of generating pit: ");
prob[0] = 5;// Integer.parseInt(dataIn.readLine());
System.out.println();
System.out.print("% chance of generating obstacle: ");
prob[1] = 5;//Integer.parseInt(dataIn.readLine());
System.out.println("");
System.out.print("% chance of generating wumpus: ");
prob[2] = 5;//Integer.parseInt(dataIn.readLine());
System.out.println("");
game = new WumpusGame(size, prob);
}
if (newStart) {
game = new WumpusGame("clean.txt");
}
World world = new World("PerceptBoard.txt");
world.startGame("LogicExplorer");
//Agent explorer = new ReactiveExplorer(world, world.getLocation(), world.direction,world.getPercepts(), world.arrowCount);
// World world = new World("PerceptBoard.txt");
//world.startGame("LogicExplorer");
// world.startGame("ReactiveExplorer");
//Agent explorer = new LogicExplorer(world);

//world = new World("PerceptBoard.txt");
// Agent explorer = new ReactiveExplorer(world, world.getLocation(), world.direction, world.getPercepts(), world.arrowCount);
}

}
Loading