0

I know how to solve gird world using policy iteration method. but how can I solve a general environment? My data is like this:

partial data

This is part of my data, it describe the transition model, please mention the source and destination type is String, I don't want to create a grid world.

I don't know how to define my state, and how to get them. Can I use a vector to store them? but how to define them is the first problem.

Nick Larsen
  • 18,631
  • 6
  • 67
  • 96
Qing Li
  • 21
  • 1
  • 5

1 Answers1

0

It's fine to leave the states as strings, and each unique string represents a single state. You can store them as a dictionary of string to float. I think in java this would be a Map.

Map<string, double> states = new HashMap<string, double>();
Nick Larsen
  • 18,631
  • 6
  • 67
  • 96
  • Thanks, Nick. But I need to read them from a text file, and then store them in my java file. how can I do that? Because the string is represented the "source" and "destination", and if the double type means the probability? – Qing Li Dec 15 '17 at 17:31