Example #1
0
'''
Created on May 8, 2011

@author: inesmeya
'''
from agent import TheAgent
from room_problems import all_static_rooms

print "Start"



problem = all_static_rooms.values()[12]
print problem
agent = TheAgent()

solution = agent.solve(problem, 10)

if solution == None:
    #print 'Running time:', run_time
    print "No solution found"
else:
    
    #h = heuristics.PowerHeuristic2()
    print " -------------------Solving "
    print 'steps: '
    '''
    or step in solution:
        problem.nextState(step)
        print "eval=", h.evaluate(problem)
        print step
Example #2
0
'''
Created on May 8, 2011

@author: inesmeya
'''
from agent import TheAgent
from room_problems import all_static_rooms

print "Start"

problem = all_static_rooms.values()[12]
print problem
agent = TheAgent()

solution = agent.solve(problem, 10)

if solution == None:
    #print 'Running time:', run_time
    print "No solution found"
else:

    #h = heuristics.PowerHeuristic2()
    print " -------------------Solving "
    print 'steps: '
    '''
    or step in solution:
        problem.nextState(step)
        print "eval=", h.evaluate(problem)
        print step
        print problem
    '''
Example #3
0
def test_reacheble():   
    for room in all_static_rooms.values():
        if not is_room_solvable(room):
            print "Error reacheble"
    print "OK reacheble"
Example #4
0
def test_reacheble():
    for room in all_static_rooms.values():
        if not is_room_solvable(room):
            print "Error reacheble"
    print "OK reacheble"