local function getAction(r_table, Q_table)
r_table["a"]["a_a"]["a_a_a"]["a_a_a_a"] = Q_table["a_a_a_a"]
table.insert(r_table["a"]["a_c"], Q_table["a_c"][1])
r_table["a"]["a_d"] = Q_table["a_d"]
return r_table
end
local r_table = {
["a"] = {
["a_a"]={
["a_a_a"]={
}
},
["a_b"]={
["origin"]="test"
},
["a_c"]={
"P_CH",
"D_Q_CH",
"S_CH"
}
}
}
local Q_table = {
["a_a_a_a"] = {
"q1"
},
["a_d"] = {
["q1"] = {
["q"]="q1",
}
},
["a_b"] = {
["a_b_1"] = nil,
["a_b_2"] = {
["4gi"] = 8
}
},
["a_c"] = {
"Q_M"
}
}
getAction(r_table, Q_table)
for k, v in pairs(r_table["a"]["a_c"]) do
print(k, v)
end
print("=========通过=========")
print(r_table["a"]["a_a"]["a_a_a"]["a_a_a_a"][1])
print(r_table["a"]["a_a"]["a_a_a"]["a_a_a_a"][2])
print(r_table["a_d"]["q1"]["q"])