Giter VIP home page Giter VIP logo

pythonpddl's People

Contributors

guilyx avatar mergify[bot] avatar renovate-bot avatar renovate[bot] avatar sampreets3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pythonpddl's Issues

Try catch when using DRH

Describe the bug
On some domains, delete relaxation either run indefinitely at a fixed point or breaks completely the code

To Reproduce
Run the DataAnalyst.plot_astar_comparison method

Expected behavior
It will hold on some domains, exit with failure on others

Add Dijkstra

Will be implemented having A* in mind (A* with H=0)

Integrate tests for planners

  • python3 -m pip install pytest
  • Add test_${NAME_OF_PLANNER}
  • Test different things on the methods/search results, whatever, even if it's as dumb as len(path) > 0
  • Run pytest and make them pass

Improve coverage

Every method implemented must be tested to reach 100% coverage.

Improve API

  • Make the projects more easy to use in REFL mode
  • Keep in mind this will be installed using pip
  • The main.py should not run everything automatically, add more arguments

Add DFS

  • Respect case and PEP20/PEP8 (variables_names_like_this), no short vars names
  • Install the black formatter and run black .
  • Implement DFS

Format Actions hides the actual CI

The CI shows it has passed with 2 checks when the format commit is applied. We will move formatting to a commit to main when a MR is merged

Use logger instead of prints

import logging
logging.basicConfig(filename='app.log', encoding='utf-8', level=logging.DEBUG)
logging.debug('This message should go to the log file')
logging.info('So should this')
logging.warning('And this, too')
logging.error('And non-ASCII stuff, too, like Øresund and Malmö')
  • Add app.log to gitignore
  • Replace info prints by logging.info
  • Replace non critical failures by logging.debug (ex: when no path is found)
  • Add error logging on critical failures (not sure yet if there should be any)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build.yml
  • actions/checkout v2
  • actions/setup-python v3
  • actions/checkout v2.4.0
  • julia-actions/setup-julia v1
  • snickerbockers/submodules-init v4
.github/workflows/format.yml
  • actions/checkout v2
  • actions/checkout v2
  • actions/setup-python v3
  • stefanzweifel/git-auto-commit-action v4.14.0
.github/workflows/tests.yml
  • actions/checkout v2
  • actions/setup-python v3
  • actions/checkout v2.4.0
  • julia-actions/setup-julia v1
  • snickerbockers/submodules-init v4
  • actions/checkout v2
  • actions/setup-python v3
  • actions/checkout v2.4.0
  • julia-actions/setup-julia v1
  • snickerbockers/submodules-init v4
  • codecov/codecov-action v2
pip_requirements
requirements.txt
  • julia ==0.5.7
  • coloredlogs ==15.0.1
  • matplotlib ==3.5.1

  • Check this box to trigger a request for Renovate to run again on this repository

Increase performance by hashing states

As of now, every time we want to open a state we:

  • Check the available actions from the parent state
  • Apply an action on the parent state to get a child state

This is quite expensive computationally. A way to reduce those costs is to hash the actions available with the same hash as a state using __hash so that we only have to get it from a dict if we already did an action on the same state.

Same goes for the computation of a child state. If we do action x on parent y again, we should be able to retrieve the child state way faster than before.

Increase performance

I think I figured out why the Julia API calls take time.
The first time they're called, they're initialized ! and when they're called again afterwards, they're ok !

I will try to run them at least once in the constructor and see if it improves the times on first execution

Relaxed Critical Path H^n for n > 1

Only computes single facts as of now (hardcoded in the julia utils we added)
Need to write Julia functions to compute costs to tuple/truple/etc..; of facts

Package the output into a more readable format

The current output of the planning problem is difficult to interpret for someone who does not know what to look for. For example, the current solution provided is something like the following:

[(<PyCall.jlwrap flip_row(r1)>, 1), (<PyCall.jlwrap flip_row(r3)>, 1), (<PyCall.jlwrap flip_column(c2)>, 1)]
Computation time: 18.53

It would be more preferable to have the output in a much simpler fashion, something like :

flip_row(r1), 1
flip_row(r3), 1
flip_row(c2), 1

I think this might be easily achieved by storing the output and trimming off the unnecessary bits, but we'll see about that during implementation.

In DFS, visited = path

In DFS, the visited list is the path
But we return the last node and then do a traceback from parent to child like with other planners
I'm not sure it works

Maybe we should return a path, computation_time, opened_nodes for DFS instead

Investigate if it breaks or not functions that call it (but it shouldn't since only AutomatedPlanner calls dfs.search() directly

We have:

if self.automated_planner.satisfies(self.automated_planner.problem.goal, current_node.state):
       computation_time = now() - time_start
       self.automated_planner.logger.debug( "Search finished at: " + str(timestamp.now()))
       return current_node, computation_time, opened_nodes
return None, computation_time, opened_nodes
def depth_first_search(self):
    dfs = DepthFirstSearch(self)
    last_node, total_time, opened_nodes = dfs.search()
    path = self.__retrace_path(last_node)
    return path, total_time, opened_nodes

We should have:

if self.automated_planner.satisfies(self.automated_planner.problem.goal, current_node.state):
       computation_time = now() - time_start
       self.automated_planner.logger.debug( "Search finished at: " + str(timestamp.now()))
       return self.visited, computation_time, opened_nodes
return [], computation_time, opened_nodes
def depth_first_search(self):
dfs = DepthFirstSearch(self)
path, total_time, opened_nodes = dfs.search()
return path, total_time, opened_nodes

Guidelines

Hey there and thank you for using Issue Tracker!

Do the checklist before filing an issue:

  • Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
  • Have an idea for a feature? Post the feature request on Product Pains. It has a voting system to surface the important issues. GitHub issues should only be used for bugs.
  • Usage question ? The Issue Template will be available soon.

None of the above, create a bug report

Make sure to add all the information needed to understand the bug so that someone can help. If the info is missing we'll add the 'Needs more information' label and close the issue until there is enough information.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.