# How to construct Q-table for complex, large and dynamic spaces in python?

I am trying to construct a Q-table.

I have state space and action space. State space consists of large number of complex and dynamic number of elements, but discrete.

Theoretically, I understood everything about Q-table. I can also construct Q-table if state and action spaces are integers.

But I am unable to implement for state and action spaces if they are complex in nature. Complex here refers to the complexity of representation of state and action information opposed to integer representation. Assume that my state representation is a large list, which in turn contains dynamic lists or tuples or integers.

Assume that the table contains at-least $$10^{50}$$ entries. $$10^{30}$$ rows for states and $$10^{20}$$ for action columns.

Which data structure is generally used by Python RL programmers to create a Q-table for such complex state and action spaces?